[jboss-user] [JBossWS] - soap message not correct?

jtestori do-not-reply at jboss.com
Mon Oct 8 03:14:35 EDT 2007


i have an existing oracle-bpel-process that i want to call with JBossWS. so i used wsconsume to create java classes for the WSDL. but when i use the classes to call the webservice, the generated soap-message seems to be incorrect:


  | <inputVariable>
  |   <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
  |     <ns1:ApproveActivityIN xmlns:ns1="http://www.example.org">
  |       <activityId>1684</activityId>
  |       <action>approve</action>
  |       </ns1:ApproveActivityIN>
  |   </part>
  | </inputVariable>
  | 

the namespace for activity and action are missing. in my opinion it should look like this:

  | <inputVariable>
  |   <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
  |     <ns1:ApproveActivityIN xmlns:ns1="http://www.example.org">
  |       <ns1:activityId>1684</ns1:activityId>
  |       <ns1:action>approve</ns1:action>
  |       </ns1:ApproveActivityIN>
  |   </part>
  | </inputVariable>
  | 

here's the wsdl of my bpel-process:

  | <?xml version="1.0" encoding="UTF-8"?>
  | <definitions
  |      name="ApproveActivity"
  |      targetNamespace="http://xmlns.oracle.com/ApproveActivity"
  |      xmlns="http://schemas.xmlsoap.org/wsdl/"
  |      xmlns:tns="http://xmlns.oracle.com/ApproveActivity"
  |      xmlns:ns1="http://www.example.org"
  |      xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
  |      xmlns:ns2="http://www.example.org"
  |      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
  |      xmlns:client="http://xmlns.oracle.com/ApproveActivity"
  |     >
  |     <types>
  |         <schema xmlns="http://www.w3.org/2001/XMLSchema">
  |             <import namespace="http://www.example.org" schemaLocation="ApproveActivityIN.xsd"/>
  |         </schema>
  |         <schema xmlns="http://www.w3.org/2001/XMLSchema">
  |             <import namespace="http://www.example.org" schemaLocation="ApproveActivityOUT.xsd"/>
  |         </schema>
  |     </types>
  |     <message name="ApproveActivityRequestMessage">
  |         <part name="payload" element="ns1:ApproveActivityIN"/>
  |     </message>
  |     <message name="ApproveActivityResponseMessage">
  |         <part name="payload" element="ns1:ApproveActivityOUT"/>
  |     </message>
  |     <portType name="ApproveActivity">
  |         <operation name="process">
  |             <input message="tns:ApproveActivityRequestMessage"/>
  |             <output message="tns:ApproveActivityResponseMessage"/>
  |         </operation>
  |     </portType>
  |     <binding name="ApproveActivityBinding" type="tns:ApproveActivity">
  |         <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
  |         <operation name="process">
  |             <soap:operation style="document" soapAction="process"/>
  |             <input>
  |                 <soap:body use="literal"/>
  |             </input>
  |             <output>
  |                 <soap:body use="literal"/>
  |             </output>
  |         </operation>
  |     </binding>
  |     <service name="ApproveActivity">
  |         <port name="ApproveActivityPort" binding="tns:ApproveActivityBinding">
  |             <soap:address location="http://sh159:8888/orabpel/default/ApproveActivity/1.0"/>
  |         </port>
  |     </service>
  |   <plnk:partnerLinkType name="ApproveActivity">
  |     <plnk:role name="ApproveActivityProvider">
  |       <plnk:portType name="tns:ApproveActivity"/>
  |     </plnk:role>
  |   </plnk:partnerLinkType>
  | </definitions>
  | 

and the xsd for the input:

  | <?xml version="1.0" encoding="windows-1252" ?>
  | <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  |             xmlns="http://www.example.org"
  |             targetNamespace="http://www.example.org"
  |             elementFormDefault="qualified">
  |   <xsd:element name="ApproveActivityIN">
  |     <xsd:annotation>
  |       <xsd:documentation>
  |       </xsd:documentation>
  |     </xsd:annotation>
  |     <xsd:complexType>
  |       <xsd:sequence>
  |         <xsd:element name="activityId">
  |           <xsd:simpleType>
  |             <xsd:restriction base="xsd:int">
  |               <xsd:minInclusive value="0"/>
  |             </xsd:restriction>
  |           </xsd:simpleType>
  |         </xsd:element>
  |         <xsd:element name="action">
  |           <xsd:simpleType>
  |             <xsd:restriction base="xsd:string">
  |               <xsd:enumeration value="approve"/>
  |               <xsd:enumeration value="reject"/>
  |             </xsd:restriction>
  |           </xsd:simpleType>
  |         </xsd:element>
  |       </xsd:sequence>
  |     </xsd:complexType>
  |   </xsd:element>
  | </xsd:schema>
  | 

when i use xfire/aegis to create the client classes, everything works as expected. but i would like to use JBossWS because i use JBoss AS anyway.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092412#4092412

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092412



More information about the jboss-user mailing list