EMAIL BC Example Fails

12 messages Options
Embed this post
Permalink
Chris Buda

EMAIL BC Example Fails

Reply Threaded More More options
Print post
Permalink
I downloaded the demo app off the Email BC page and when I build it I get a number of errors.  Is this demo supported for particular versions on Netbeans?  Or not supported at all?  The demo is labeled "Sending email with attachments demo".  One of the errors I get seems to day that it does not like sub elements within the SMTPInput element which is where it seems to define an email attachment.

WSDL SOURCE

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="EmailSender" targetNamespace="http://j2ee.netbeans.org/wsdl/SendEmailWithAttachments/EmailSender"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:email="http://schemas.sun.com/jbi/wsdl-extensions/email/"
    xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" xmlns:tns="http://j2ee.netbeans.org/wsdl/SendEmailWithAttachments/EmailSender">
    <types/>
    <message name="EmailSenderInputMessage">
        <part name="from" type="xsd:string"/>
        <part name="to" type="xsd:string"/>
        <part name="subject" type="xsd:string"/>
        <part name="message" type="xsd:string"/>
        <part name="attachmentText" type="xsd:string"/>
        <part name="bcc" type="xsd:string"/>
        <part name="cc" type="xsd:string"/>
    </message>
    <portType name="EmailSenderPortType">
        <operation name="SendEmail">
            <input name="input1" message="tns:EmailSenderInputMessage"/>
        </operation>
    </portType>
    <binding name="EmailSenderBinding" type="tns:EmailSenderPortType">
        <email:SMTPbinding/>
        <operation name="SendEmail">
            <email:SMTPoperation/>
            <input name="input1">
                <email:SMTPinput message="message" subject="subject" from="from" to="to" embedImagesInHtml="false" handleNMAttachments="false" use="literal" sendOption="Text Only" cc="cc" bcc="bcc">
                    <email:SMTPattachment disposition="ATTACHMENT" readFromFile="c:\temp\output.txt"/>
                    <email:SMTPattachment partName="attachmentText" disposition="ATTACHMENT"/>
                </email:SMTPinput>
            </input>
        </operation>
    </binding>
    <service name="EmailSenderService">
        <port name="EmailSenderPort" binding="tns:EmailSenderBinding">
            <email:SMTPaddress emailServer="smtp.gmail.com" useSSL="true" port="465" userName="<replace>" password="<replace>"/>
        </port>
    </service>
    <plnk:partnerLinkType name="EmailSender">
        <!-- A partner link type is automatically generated when a new port type is added. Partner link types are used by BPEL processes.
In a BPEL process, a partner link represents the interaction between the BPEL process and a partner service. Each partner link is associated with a partner link type.
A partner link type characterizes the conversational relationship between two services. The partner link type can have one or two roles.-->
        <plnk:role name="EmailSenderPortTypeRole" portType="tns:EmailSenderPortType"/>
    </plnk:partnerLinkType>
</definitions>


ERRORS

C:/Documents and Settings/cbuda/My Documents/NetBeansProjects/SendEmailWithAttachments/src/sendEmailWithAttachments.bpel:53: 12
WARNING: The types of "From" and "To" activities are different: "string" and "EmailSenderInputMessage".

C:/Documents and Settings/cbuda/My Documents/NetBeansProjects/SendEmailWithAttachments/src/EmailSender.wsdl:28: 16
ERROR: cvc-complex-type.3.2.2: Attribute 'embedImagesInHtml' is not allowed to appear in element 'email:SMTPinput'.

C:/Documents and Settings/cbuda/My Documents/NetBeansProjects/SendEmailWithAttachments/src/EmailSender.wsdl:28: 16
ERROR: cvc-complex-type.3.2.2: Attribute 'handleNMAttachments' is not allowed to appear in element 'email:SMTPinput'.

C:/Documents and Settings/cbuda/My Documents/NetBeansProjects/SendEmailWithAttachments/src/EmailSender.wsdl:28: 16
ERROR: cvc-complex-type.3.2.2: Attribute 'sendOption' is not allowed to appear in element 'email:SMTPinput'.

C:/Documents and Settings/cbuda/My Documents/NetBeansProjects/SendEmailWithAttachments/src/EmailSender.wsdl:28: 16
ERROR: cvc-complex-type.2.1: Element 'email:SMTPinput' must have no character or element information item [children], because the type's content type is empty.

C:/Documents and Settings/cbuda/My Documents/NetBeansProjects/SendEmailWithAttachments/src/EmailSender.wsdl:37: 12
ERROR: The value of attribute "userName" associated with an element type "null" must not contain the '<' character.

C:/Documents and Settings/cbuda/My Documents/NetBeansProjects/SendEmailWithAttachments/src/sendEmailWithAttachments.bpel:50: 16
ERROR: The content of elements must consist of well-formed character data or markup.

Found validation error(s).
BUILD FAILED (total time: 0 seconds)
Shivanand Kini

Re: EMAIL BC Example Fails

Reply Threaded More More options
Print post
Permalink
I have updated the sample project. You need to put proper username,
password in wsdl file and from field in the bpel.
Its marked with <Add ... >, thats why you get the errors, while validating.

Thanks,
Shivanand

Chris Buda wrote:

> I downloaded the demo app off the Email BC page and when I build it I get a
> number of errors.  Is this demo supported for particular versions on
> Netbeans?  Or not supported at all?  The demo is labeled "Sending email with
> attachments demo".  One of the errors I get seems to day that it does not
> like sub elements within the SMTPInput element which is where it seems to
> define an email attachment.
>
> WSDL SOURCE
>
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions name="EmailSender"
> targetNamespace="http://j2ee.netbeans.org/wsdl/SendEmailWithAttachments/EmailSender"
>     xmlns="http://schemas.xmlsoap.org/wsdl/"
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>     xmlns:email="http://schemas.sun.com/jbi/wsdl-extensions/email/"
>     xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
> xmlns:tns="http://j2ee.netbeans.org/wsdl/SendEmailWithAttachments/EmailSender">
>     <types/>
>     <message name="EmailSenderInputMessage">
>         <part name="from" type="xsd:string"/>
>         <part name="to" type="xsd:string"/>
>         <part name="subject" type="xsd:string"/>
>         <part name="message" type="xsd:string"/>
>         <part name="attachmentText" type="xsd:string"/>
>         <part name="bcc" type="xsd:string"/>
>         <part name="cc" type="xsd:string"/>
>     </message>
>     <portType name="EmailSenderPortType">
>         <operation name="SendEmail">
>             <input name="input1" message="tns:EmailSenderInputMessage"/>
>         </operation>
>     </portType>
>     <binding name="EmailSenderBinding" type="tns:EmailSenderPortType">
>         <email:SMTPbinding/>
>         <operation name="SendEmail">
>             <email:SMTPoperation/>
>             <input name="input1">
>                 <email:SMTPinput message="message" subject="subject"
> from="from" to="to" embedImagesInHtml="false" handleNMAttachments="false"
> use="literal" sendOption="Text Only" cc="cc" bcc="bcc">
>                     <email:SMTPattachment disposition="ATTACHMENT"
> readFromFile="c:\temp\output.txt"/>
>                     <email:SMTPattachment partName="attachmentText"
> disposition="ATTACHMENT"/>
>                 </email:SMTPinput>
>             </input>
>         </operation>
>     </binding>
>     <service name="EmailSenderService">
>         <port name="EmailSenderPort" binding="tns:EmailSenderBinding">
>             <email:SMTPaddress emailServer="smtp.gmail.com" useSSL="true"
> port="465" userName="<replace>" password="<replace>"/>
>         </port>
>     </service>
>     <plnk:partnerLinkType name="EmailSender">
>         <!-- A partner link type is automatically generated when a new port
> type is added. Partner link types are used by BPEL processes.
> In a BPEL process, a partner link represents the interaction between the
> BPEL process and a partner service. Each partner link is associated with a
> partner link type.
> A partner link type characterizes the conversational relationship between
> two services. The partner link type can have one or two roles.-->
>         <plnk:role name="EmailSenderPortTypeRole"
> portType="tns:EmailSenderPortType"/>
>     </plnk:partnerLinkType>
> </definitions>
>
>
> ERRORS
>
> C:/Documents and Settings/cbuda/My
> Documents/NetBeansProjects/SendEmailWithAttachments/src/sendEmailWithAttachments.bpel:53:
> 12
> WARNING: The types of "From" and "To" activities are different: "string" and
> "EmailSenderInputMessage".
>
> C:/Documents and Settings/cbuda/My
> Documents/NetBeansProjects/SendEmailWithAttachments/src/EmailSender.wsdl:28:
> 16
> ERROR: cvc-complex-type.3.2.2: Attribute 'embedImagesInHtml' is not allowed
> to appear in element 'email:SMTPinput'.
>
> C:/Documents and Settings/cbuda/My
> Documents/NetBeansProjects/SendEmailWithAttachments/src/EmailSender.wsdl:28:
> 16
> ERROR: cvc-complex-type.3.2.2: Attribute 'handleNMAttachments' is not
> allowed to appear in element 'email:SMTPinput'.
>
> C:/Documents and Settings/cbuda/My
> Documents/NetBeansProjects/SendEmailWithAttachments/src/EmailSender.wsdl:28:
> 16
> ERROR: cvc-complex-type.3.2.2: Attribute 'sendOption' is not allowed to
> appear in element 'email:SMTPinput'.
>
> C:/Documents and Settings/cbuda/My
> Documents/NetBeansProjects/SendEmailWithAttachments/src/EmailSender.wsdl:28:
> 16
> ERROR: cvc-complex-type.2.1: Element 'email:SMTPinput' must have no
> character or element information item [children], because the type's content
> type is empty.
>
> C:/Documents and Settings/cbuda/My
> Documents/NetBeansProjects/SendEmailWithAttachments/src/EmailSender.wsdl:37:
> 12
> ERROR: The value of attribute "userName" associated with an element type
> "null" must not contain the '<' character.
>
> C:/Documents and Settings/cbuda/My
> Documents/NetBeansProjects/SendEmailWithAttachments/src/sendEmailWithAttachments.bpel:50:
> 16
> ERROR: The content of elements must consist of well-formed character data or
> markup.
>
> Found validation error(s).
> BUILD FAILED (total time: 0 seconds)
>
>  

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Chris Buda

Re: EMAIL BC Example Fails

Reply Threaded More More options
Print post
Permalink
In reply to this post by Chris Buda
So I changed the smtp server name, I don't need a user and pw, and I supplied a from address.  But I still could not get it to work unless I removed the following :

  embedImagesInHtml="false"
  handleNMAttachments="false"
  use="literal"
  sendOption="Text Only"

and removed the SMTPattachment child nodes

and added a location attribute to SMTPinput tag

I am using Netbeans 6.7 at the moment, does that make a difference?
Shivanand Kini

Re: EMAIL BC Example Fails

Reply Threaded More More options
Print post
Permalink
I am not sure, are using a recent emailbc installer?

But even without those attributes, you should be able to send an email.

Chris Buda wrote:

> So I changed the smtp server name, I don't need a user and pw, and I supplied
> a from address.  But I still could not get it to work unless I removed the
> following :
>
>   embedImagesInHtml="false"
>   handleNMAttachments="false"
>   use="literal"
>   sendOption="Text Only"
>
> and removed the SMTPattachment child nodes
>
> and added a location attribute to SMTPinput tag
>
> I am using Netbeans 6.7 at the moment, does that make a difference?
>  

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Chris Buda

Re: EMAIL BC Example Fails

Reply Threaded More More options
Print post
Permalink

Yes I can send an email if I remove the attributes but not with them. I was hoping to be able to send with an attachment.

I downloaded the version of BC that was compiled for NB 6.7


From: Shivanand Kini [via OpenESB Users] <[hidden email]>
To: Buda, Christopher J
Sent: Fri Oct 30 14:24:33 2009
Subject: Re: EMAIL BC Example Fails

I am not sure, are using a recent emailbc installer?

But even without those attributes, you should be able to send an email.

Chris Buda wrote:

> So I changed the smtp server name, I don't need a user and pw, and I supplied
> a from address.  But I still could not get it to work unless I removed the
> following :
>
>   embedImagesInHtml="false"
>   handleNMAttachments="false"
>   use="literal"
>   sendOption="Text Only"
>
> and removed the SMTPattachment child nodes
>
> and added a location attribute to SMTPinput tag
>
> I am using Netbeans 6.7 at the moment, does that make a difference?
>  
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




View message @ http://n2.nabble.com/EMAIL-BC-Example-Fails-tp3915508p3920684.html
To unsubscribe from Re: EMAIL BC Example Fails, click here.


______________________________________________________________________
CONFIDENTIALITY WARNING: This email may contain confidential or proprietary business information and is for the sole use of the intended recipient(s). Any unauthorized use or disclosure of this communication, including attachments, is strictly prohibited. If you believe that you have received this email in error, please notify the sender immediately and delete it from your system.
______________________________________________________________________
Chris Buda

Re: EMAIL BC Example Fails

Reply Threaded More More options
Print post
Permalink
In reply to this post by Chris Buda
Any more advice I can get on this one?  I could really use the ability to add attachments to emails sent.   I downloaded the sample again but still same result.

Can someone point me to where I should get the BC that corresponds to this sample?  Any version issues with NB or GF I should be aware of?

Thanks in advance.
Harry Liu

Re: EMAIL BC Example Fails

Reply Threaded More More options
Print post
Permalink
Chris,

Your EmailBC (nbm) doesn't match with the downloaded sample
http://wiki.open-esb.java.net/attach/EmailBC/SendEmailWithAttachments.zip.

Have you tried to build your own example from your env? That would be
consistent with your env.


Harry


On 11/2/2009 7:00 PM, Chris Buda wrote:
> Any more advice I can get on this one?  I could really use the ability to add
> attachments to emails sent.   I downloaded the sample again but still same
> result.
>
> Can someone point me to where I should get the BC that corresponds to this
> sample?  Any version issues with NB or GF I should be aware of?
>
> Thanks in advance.
>  

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Chris Buda

Re: EMAIL BC Example Fails

Reply Threaded More More options
Print post
Permalink
In reply to this post by Chris Buda
I tried creating my own WSDL using the EMAIL BC and I do not get the same options that I see in the example WSDL.

Could you give me an idea if what my env should look like in order to get this to work?

Thanks
Harry Liu

Re: EMAIL BC Example Fails

Reply Threaded More More options
Print post
Permalink
That exactly confirms your EmailBC doesn't match with the downloaded
example
http://wiki.open-esb.java.net/attach/EmailBC/SendEmailWithAttachments.zip.

Assume your EmailBC was installed from
https://open-esb.dev.java.net/Downloads.html.

I don't exactly know what options you are looking for. Assuming you
intend to send email with attachments, I am attaching a test project
(SendEmail.zip) for your reference. You just need to replace the
server/user/password etc with your own settings.


Thanks,
Harry

 
On 11/3/2009 10:44 AM, Chris Buda wrote:
> I tried creating my own WSDL using the EMAIL BC and I do not get the same
> options that I see in the example WSDL.
>
> Could you give me an idea if what my env should look like in order to get
> this to work?
>
> Thanks
>  


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

SendEmail.zip (43K) Download Attachment
Chris Buda

Re: EMAIL BC Example Fails

Reply Threaded More More options
Print post
Permalink
In reply to this post by Chris Buda
Thanks Henry

You are correct, I am looking for attachment support.  And I did download the BC from the link you mentioned (6.7).  So what is the answer then?  How to I get access to those attachment options?  Is it only supported in 6.5 at the moment?

Chris
Harry Liu

Re: EMAIL BC Example Fails

Reply Threaded More More options
Print post
Permalink
Chris,

Just checked the EmailBC from 6.7 link, it is pretty old (especially
email-ext.xsd in nbm is old), it doesn't support attachment.
You may want to try the one from 6.5 link which is much newer and
support attachment. The test project sent in previous email was created
against this one.

Thanks,
Harry

On 11/3/2009 1:36 PM, Chris Buda wrote:
> Thanks Henry
>
> You are correct, I am looking for attachment support.  And I did download
> the BC from the link you mentioned (6.7).  So what is the answer then?  How
> to I get access to those attachment options?  Is it only supported in 6.5 at
> the moment?
>
> Chris
>  

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Chris Buda

Re: EMAIL BC Example Fails

Reply Threaded More More options
Print post
Permalink
In reply to this post by Chris Buda
Thanks, that's what I was looking for.  Any idea when there will be full support for 6.7?