axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hines, Jeffrey N \(US SSA\)" <jeffrey.hi...@baesystems.com>
Subject Will JiBX work for me?
Date Tue, 15 Apr 2008 22:58:12 GMT
I'm new to Axis2 and Web Services.  I want to build a Web Service with
Axis2, and I want to make sure I pick a data-binding method that will
work for me before I spend a lot of time and find out it won't work.

 

I have a WSDL that I want to use and I have some Java classes for the
data objects already.  Since I have both, JiBX looked to be the best
approach.  My WSDL is also in doc/lit style.  My web service consists of
one operation.  I believe the operation consists of a single input and
output element (you'll see my question later on), so I would like to use
the "unwrapped" style of JiBX.

 

My question is whether unwrapped JiBX will also handle the <soap:header>
elements that I need to be able to process?

 

My operation consists of a single input, output and fault element.  The
input element is defined by an imported schema (that is referred to in
this WSDL with the "tr" namespace prefix).  I am also importing another
schema that has header elements (referred to with the "hdr" namespace
prefix).

 

<wsdl:types>

<xsd:schema ... >

<xsd:import ... >   <!-- import elements that will be referred to hear
with "tr" namespace -->

<xsd:import ... >   <!-- import elements that will be referred to hear
with "hdr" namespace -->

<xsd:element name="submitInfo">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="pInfo" type="tr:InfoType"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

...

</xsd:schema>

</wsdl:types>

 

<wsdl:message name="submitInfoIn">

<wsdl:part name="inSubmitInfo" element="tns:submitInfo"/>

</wsdl:message>

<wsdl:message name="SOAPHeader">

<wsdl:part name="HeaderField1" type="hdr:HeaderField1Type"/>

<wsdl:part name="HeaderField2" type="hdr:HeaderField2Type"/>

...

</wsdl:message>

 

<wsdl:portType>

<wsdl:operation name="submitInfo">

<wsdl:input name="submitInfoIn" message="tns:submitInfoIn"/>

<wsdl:output name="submitInfoOut" message="tns:submitInfoOut"/>

<wsdl:fault name="submitException" message="submitException"/>

</wsdl:operation>

</wsdl:portType>

 

<wsdl:binding ... >

<soap:binding style="document" ... />

<wsdl:operation name="submitInfo">

<soap:operation soapAction="submitInfo" style="document"/>

<wsdl:input>

<soap:header message="tns:SOAPHeader" part="HeaderField1"
use="literal"/>

<soap:header message="tns:SOAPHeader" part="HeaderField2"
use="literal"/>

...

<soap:body use="literal"/>

</wsdl:input>

...

 

Is it ok that I have multiple elements in the <wsdl:input> element under
the <wsdl:binding> element?  By using the "unwrapped" version of JiBX,
will I be able to access the <soap:header> elements?  If JiBX is not the
correct approach here, does anyone have any suggestions on a better
approach?

 

Thanks,

-Jeff Hines


Mime
View raw message