You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Hines, Jeffrey N (US SSA)" <je...@baesystems.com> on 2008/04/16 00:58:12 UTC

Will JiBX work for me?

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


RE: Will JiBX work for me?

Posted by Sean Conlon <sc...@credera.com>.
Not at all, it's just a long one. :-)  I have not had a chance to read
it yet to see if I can help.  

 

________________________________

From: Hines, Jeffrey N (US SSA) [mailto:jeffrey.hines@baesystems.com] 
Sent: Thursday, April 17, 2008 10:39 AM
To: axis-user@ws.apache.org
Subject: RE: Will JiBX work for me?

 

I haven't gotten any replies.  Is this a stupid question?

 

Thanks,

-Jeff

 

________________________________

From: Hines, Jeffrey N (US SSA) 
Sent: Tuesday, April 15, 2008 3:58 PM
To: axis-user@ws.apache.org
Subject: Will JiBX work for me?

 

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


RE: Will JiBX work for me?

Posted by "Hines, Jeffrey N (US SSA)" <je...@baesystems.com>.
I haven't gotten any replies.  Is this a stupid question?

 

Thanks,

-Jeff

 

  _____  

From: Hines, Jeffrey N (US SSA) 
Sent: Tuesday, April 15, 2008 3:58 PM
To: axis-user@ws.apache.org
Subject: Will JiBX work for me?

 

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