1 2 3 Previous Next 43 Replies Latest reply on Dec 1, 2010 9:39 AM by izgur Go to original post
      • 15. Re: RiftSaw - how to invoke an external web service
        izgur

        You wrote:

        Is it necessary to import the partner service's wsdl?

         

        If you are just sharing type definitions, then it may be better to place them in a separate file that they both reference.

        I don't know what you mean exactly.

        The IMPORT in my main WSDL(the BPEL WSDL) is added automatically when i add the INVOKE(global partner link - new link - new type)(+2ASSIGN) to my .bpel. In my main WSDL i see then my main service&binding and the partners service(just read-only) seperate....

         

         

        Is there another way?

         

        And what was important and cost me 2 days... after making the INVOKE&global partner link a had to finish my ASSIGNs before saving my BPEL.

        If I added the INVOKE without ASSIGNs, my main BPEL SERVICE - WSDL wasn't ok anymore, because it erased the request and response element and instead of them there were just messages element or type undefined.

        • 16. Re: RiftSaw - how to invoke an external web service
          objectiser

          Igor JStarter wrote:

           

          I don't know what you mean exactly.

          The IMPORT in my main WSDL(the BPEL WSDL) is added automatically when i add the INVOKE(global partner link - new link - new type)(+2ASSIGN) to my .bpel. In my main WSDL i see then my main service&binding and the partners service(just read-only) seperate....

           

          I mean that your main wsdl should not need to reference or include any information about your second web service. For example, if you look at the simple_invoke quickstart example distributed with riftsaw, the main web service (provided by the BPEL process) has the SimpleInvoke.wsdl with its partner link for use with the client. Then the wsdl for the second (JAX-WS) web service is HelloWorldWS.wsdl, and it has its service and partnerlink type definitions. There is no need for SimpleInvoke.wsdl to import or refernece the HelloWorldWS.wsdl.

           

          Regards

          Gary

          • 17. Re: RiftSaw - how to invoke an external web service
            izgur

            Man, I don't get it .)

             

            When I try to change code by hand, the bpel suddenly doesn't know what my external web services methods and its parameters are...

            The partner role deletes or something like that. And I'm in a circle no matter where I change anything...

             

            I'M TRYING DO TO THIS GRAFICALLY..

            When i add the invoke element to my bpel, add 2 assign, now it always messes up my artifacts.wsdl. Can somebody tell me why the INVOKE element in BPEL change my artifacts WSDL from:

             

            <?xml version="1.0"?>
            <definitions name="bpellGlassPojo"
                    targetNamespace="http://samples/bpellGlassPojo"
                    xmlns:tns="http://samples/bpellGlassPojo"
                    xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
                    xmlns="http://schemas.xmlsoap.org/wsdl/"
                    xmlns:wsdl="http://glasspojo.si"

                    >

             

            <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 TYPE DEFINITION - List of types participating in this BPEL process
                 The BPEL Designer will generate default request and response types
                 but you can define or import any XML Schema type and use them as part
                 of the message types.
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->   
                   <plnk:partnerLinkType name="GlassFishLinkType">
                <plnk:role name="GlassFishProvider" portType="wsdl:GlassPojoWS"/>
              </plnk:partnerLinkType>
                <import location="GlassPojoWSService.wsdl" namespace="http://glasspojo.si/"/>
                <types>
                    <schema attributeFormDefault="unqualified" elementFormDefault="qualified"
                            targetNamespace="http://samples/bpellGlassPojo"
                            xmlns="http://www.w3.org/2001/XMLSchema">

             

                        <element name="bpellGlassPojoRequest">
                            <complexType>
                                <sequence>
                                    <element name="ServiceID" type="int" />
                                    <element name="sUserName" type="string"></element>
                                    <element name="sPassword" type="string"></element>
                                </sequence>
                            </complexType>
                        </element>

             

                        <element name="bpellGlassPojoResponse">
                            <complexType>
                                <sequence>
                                    <element name="result" type="string"/>
                                </sequence>
                            </complexType>
                        </element>
                    </schema>
                </types>

             


            <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 MESSAGE TYPE DEFINITION - Definition of the message types used as
                 part of the port type defintions
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->   
                <message name="bpellGlassPojoRequestMessage">
                    <part name="payload" element="tns:bpellGlassPojoRequest"/>
                </message>
                <message name="bpellGlassPojoResponseMessage">
                    <part name="payload" element="tns:bpellGlassPojoResponse"/>
                </message>

             

            <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 PORT TYPE DEFINITION - A port type groups a set of operations into
                 a logical service unit.
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->   

             

                <!-- portType implemented by the bpellGlassPojo BPEL process -->
                <portType name="bpellGlassPojo">
                    <operation name="process">
                        <input  message="tns:bpellGlassPojoRequestMessage" />
                        <output message="tns:bpellGlassPojoResponseMessage"/>
                    </operation>
                </portType>

             

             

            <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 PARTNER LINK TYPE DEFINITION
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->   
                <plnk:partnerLinkType name="bpellGlassPojo">
                    <plnk:role name="bpellGlassPojoProvider" portType="tns:bpellGlassPojo"/>
                </plnk:partnerLinkType>
               
            </definitions>

             

            TO...

             

            <?xml version="1.0" encoding="UTF-8" standalone="no"?>
            <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" xmlns:tns="http://samples/bpellGlassPojo" xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" xmlns:wsdl="http://glasspojo.si" xmlns:wsdl1="http://glasspojo.si/" name="bpellGlassPojo" targetNamespace="http://samples/bpellGlassPojo">

             

            <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 TYPE DEFINITION - List of types participating in this BPEL process
                 The BPEL Designer will generate default request and response types
                 but you can define or import any XML Schema type and use them as part
                 of the message types.
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->   
                   <plnk:partnerLinkType name="GlassFishLinkType">
                <plnk:role name="GlassFishProvider" portType="wsdl:GlassPojoWS"/>
              </plnk:partnerLinkType>
                <plnk:partnerLinkType name="SecondGlassFishType">
                <plnk:role name="GlassFishProv" portType="wsdl1:GlassPojoWS"/>
              </plnk:partnerLinkType>
                <import location="GlassPojoWSService.wsdl" namespace="http://glasspojo.si/"/>
                <types>
                    <schema xmlns="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://samples/bpellGlassPojo">

             

                        <element name="bpellGlassPojoRequest">
                            <complexType>
                                <sequence>
                                    <element name="ServiceID" type="int"/>
                                    <element name="sUserName" type="string"/>
                                    <element name="sPassword" type="string"/>
                                </sequence>
                            </complexType>
                        </element>

             

                        <element name="bpellGlassPojoResponse">
                            <complexType>
                                <sequence>
                                    <element name="result" type="string"/>
                                </sequence>
                            </complexType>
                        </element>
                    </schema>
                </types>

             


            <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 MESSAGE TYPE DEFINITION - Definition of the message types used as
                 part of the port type defintions
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->   
                <message name="bpellGlassPojoRequestMessage">
                    <part element="tns:bpellGlassPojoRequest" name="payload"/>
                </message>
                <message name="bpellGlassPojoResponseMessage">
                    <part element="tns:bpellGlassPojoResponse" name="payload"/>
                </message>

             

            <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 PORT TYPE DEFINITION - A port type groups a set of operations into
                 a logical service unit.
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->   

             

                <!-- portType implemented by the bpellGlassPojo BPEL process -->
                <portType name="bpellGlassPojo">
                    <operation name="process">
                        <input message="tns:bpellGlassPojoRequestMessage"/>
                        <output message="tns:bpellGlassPojoResponseMessage"/>
                    </operation>
                </portType>

             

            <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 PARTNER LINK TYPE DEFINITION
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->   
                <plnk:partnerLinkType name="bpellGlassPojo">
                    <plnk:role name="bpellGlassPojoProvider" portType="tns:bpellGlassPojo"/>
                </plnk:partnerLinkType>
               
            </definitions>

            • 18. Re: RiftSaw - how to invoke an external web service
              izgur

              And suddently my Projects doesn't know that the input for my main artifacts wsdl in myprojectrequest with 2 strings and the response myprojectresponse with one string. Instead I get just ... element or type undefined

              • 19. Re: RiftSaw - how to invoke an external web service
                objectiser

                Hi

                 

                Sorry to pass the buck, but these sound like issues with the BPEL editor. I assume that you got this as part of JBoss Tools?

                 

                If so, then best to start a discussion on the JBoss Tools user forum: http://community.jboss.org/en/tools/?view=discussions

                 

                RiftSaw project is just related to the BPEL runtime.

                 

                Regards

                Gary

                • 20. Re: RiftSaw - how to invoke an external web service
                  izgur

                  Yes, my BPEL editor is part of Jboss Tools... Thank you... i'll post there...

                   

                  I'm working with the same wsdl and xsd as yesterday... which runs perfectly on other project...

                  Today I can't omit

                  "partnerLinkType" is set to "tns:enStringType" on this <bpel:partnerLink> but it cannot be resolved (check value of "partnerLinkType", imports, WSDLs or XSDs).

                   

                  Can u please tell me... are you writing code, compiling ... all by hand ? Don't use Eclipse with JbossTools ?

                  • 21. Re: RiftSaw - how to invoke an external web service
                    objectiser

                    As RiftSaw is focused on the runtime, we tend to just use hand coded examples, or examples provided by community users. So we don't tend to use the editor that much.

                     

                    The problem is that the Eclipe.org BPEL editor project was neglected for a long time, so JBoss Tools had to take a fork of the project to start trying to fix some of the issues. However recently Bob Brodt from Red Hat was appointed project lead for the Eclipse.org BPEL editor project, so we (Red Hat) are now in a position to start sorting out the project properly.

                     

                    So Bob will be keen to hear about any problems you are having - but equally it may take some time to work through all of the problems that he has inherited.

                     

                    Regards

                    Gary

                    • 22. Re: RiftSaw - how to invoke an external web service
                      izgur

                      OK.

                       

                      The thing messing up my wsdl was just the BPEL editor.)

                      So if I rewrite the main service and binding, the BPEL design knows again its inputs and outputs...

                       

                      I got one more question... what about calling a external WS with an object as input?

                      Are there problems... I can't even correct the imported wsdl or xsd in a way the would not carry errors.. ?

                       

                      On both I'm getting: The part 'parameters' has an invalid value 'createNotification' defined for its element. Element declarations must refer to valid values defined in a schema.

                       

                      The above error shows on the <part name ..>:

                      <message name="createNotification">
                      <part name="parameters" element="tns:createNotification"/>
                      </message>

                       

                      But I'm pretty sure everything is alright with the WSDL and XSD..

                      • 23. Re: RiftSaw - how to invoke an external web service
                        objectiser

                        Where is 'createNotification' element defined? The use of tns: implies that it is defined in the wsdl file. Can you include the relevant parts of your wsdl (i.e. the namespace declaration and xsd types block) where this is defined.

                         

                        Regards

                        Gary

                        • 24. Re: RiftSaw - how to invoke an external web service
                          izgur

                          WSDL and XSD was not alright.)

                          • 25. Re: RiftSaw - how to invoke an external web service
                            izgur

                            OK... no problem invoking a web service with an object input... can't believe.)

                            Just a new warning: WARN  [EndpointReferenceContextImpl] Map access not implemented

                            but I won't worry about...

                             

                            So... the almost last remaining thing is basic authentication... tomorrow...

                             

                            Again... THANK YOU FOR REPLYING!

                            • 26. Re: RiftSaw - how to invoke an external web service
                              bbrodt

                              Hi Igor,

                               

                              Sorry, I should have jumped into this conversation earlier, especially since this appears to be a BPEL editor bug...

                               

                              I'm still trying to understand how creation of a partner link could cause the editor to report a false error. Unfortunately, I'm still trying to rebuild my complete runtime environment after a HD crash, but I should be able to reproduce this by end of today. In the meantime, is it possible for you to post your project here, and help me understand where the problem lies?

                               

                              Thanks!

                              Bob

                              • 27. Re: RiftSaw - how to invoke an external web service
                                izgur

                                I wrote the steps to the bug, if it is... on the JBoss Tools discussions... http://community.jboss.org/message/57040 and I can do it here...

                                I'm just telling, how it runs on my computer.. And the instalation should be without any errors...

                                 

                                I can tell my steps...

                                1. import wsdl & xsd

                                2. new bpel process file...

                                3. add an invoke... global partner link... name the link, type and role and assign the operation...

                                4. add assign before and after the invoke element..

                                5. press SAVE and whoops...

                                 

                                In  my main WSDL myartifacts.wsdl design view,the input myprojectrequest  and output myprojectresponse isn't there any more (it was there from the  beginning, when I said new BPEL process file and a BPEL and a WSDL file was generated ), just a red element or  type undefined.

                                 

                                But  I found (after a day) that if I than add my service and binding written  by hand to the wsdl, and switch back to the design view, everything is  ok again. If the service&binding has already been defined, and I add  a new INVOKE, I get element or type undefined and here I can fix it if I  delete the service&binding and save, and the paste it again in the  same place... That's the way it works for me ...

                                 

                                BR, Igor!

                                 

                                • 28. Re: RiftSaw - how to invoke an external web service
                                  izgur

                                  Till Friday I need to know if I'm able to call a external web service which uses the UsernameToken basic authentication...

                                   

                                  Up to know I just took a look at the SecureInvokeExample...

                                   

                                  I didn't see that anything for the authentication would be specified in WSDL or BPEL file...

                                   

                                  That means that jbossws-cxf-myPort.xml does it all ?

                                   

                                  If  I get this right I have to write the jbossws-cxf-myPort.xml where I  specify both beans (message elements from WSDL) and for each specify the  <map> tag.

                                   

                                  Are all this <entry> necessary : passwordCallbackClass, signaturePropFile, singatureKeyIdentifier?

                                  Do I need to write these .jks files ?

                                   

                                  Merlin? OK... I have a lot of reading to do...

                                   

                                  I hope somebody could explain ...

                                  • 29. Re: RiftSaw - how to invoke an external web service
                                    objectiser

                                    Hi Igor

                                     

                                    If you are under time pressure, then I think the best thing to do is ask your question on the jbossws user forum.

                                     

                                    RiftSaw only currently supports WS-Security, not HTTP basic authentication directly - so if there is a way to use jbossws-cxf configuration to invoke an external basic authentication service, then you will need to check with the jbossws-cxf team.

                                     

                                    If you find a solution, could you post it here.

                                     

                                    Sorry couldn't help with this one.

                                     

                                    Regards

                                    Gary