Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Interoperability JAVA / .NET
Interoperability JAVA / .NET [message #168519] Thu, 04 May 2006 14:41 Go to next message
Eclipse UserFriend
Originally posted by: arochefort.consignity.fr

Hello
I'm trying to create a J2EE client for a webservice made whith .NET. I
use Tomcat/Axis and the server uses IIS.
I've generate webservices classes using the graphical tool of Eclipse WTP.

I don't know how to put the auhtentification header.

The problem is that when a generate classes from the WSDL, I haven't the
class AuthHeader which is in the WSDL, and when I call the method
validerOperation(...) the server returns : "--> The referenced object is
not linked to an instancied object".

Here is the WSDL :

<wsdl:definitions
targetNamespace="https://clients.webservices.novea.fr/arlanda10/">
<wsdl:types>
<s:schema elementFormDefault="qualified"
targetNamespace="https://clients.webservices.novea.fr/arlanda10/">
<s:element name="Ping">
<s:complexType/>
</s:element>
<s:element name="PingResponse">
<s:complexType/>
</s:element>
<s:element name="ValiderOperation">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="numeroCommande"
type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="codeCoursier" type="s:int"/>
<s:element minOccurs="1" maxOccurs="1" name="retraitDepot"
type="s:boolean"/>
<s:element minOccurs="0" maxOccurs="1" name="consigne" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="ValiderOperationResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="ValiderOperationResult"
type="s:boolean"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="AuthHeader" type="tns:AuthHeader"/>
<s:complexType name="AuthHeader">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Username" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="Langue" type="s:string"/>
</s:sequence>
</s:complexType>
</s:schema>
</wsdl:types>
<wsdl:message name="PingSoapIn">
<wsdl:part name="parameters" element="tns:Ping"/>
</wsdl:message>
<wsdl:message name="PingSoapOut">
<wsdl:part name="parameters" element="tns:PingResponse"/>
</wsdl:message>
<wsdl:message name="ValiderOperationSoapIn">
<wsdl:part name="parameters" element="tns:ValiderOperation"/>
</wsdl:message>
<wsdl:message name="ValiderOperationSoapOut">
<wsdl:part name="parameters" element="tns:ValiderOperationResponse"/>
</wsdl:message>
<wsdl:message name="ValiderOperationAuthHeader">
<wsdl:part name="AuthHeader" element="tns:AuthHeader"/>
</wsdl:message>
<wsdl:portType name="consignitySoap">
<wsdl:operation name="Ping">
<documentation>
Méthode simple pour vérifier la connexion au Web Service
</documentation>
<wsdl:input message="tns:PingSoapIn"/>
<wsdl:output message="tns:PingSoapOut"/>
</wsdl:operation>
<wsdl:operation name="ValiderOperation">
<documentation>
Permet de valider le dépôt ou le retrait d'une commande dans une consigne.
</documentation>
<wsdl:input message="tns:ValiderOperationSoapIn"/>
<wsdl:output message="tns:ValiderOperationSoapOut"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="consignitySoap" type="tns:consignitySoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
<wsdl:operation name="Ping">
<soap:operation
soapAction="https://clients.webservices.novea.fr/arlanda10/Ping"
style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="ValiderOperation">
<soap:operation
soapAction=" https://clients.webservices.novea.fr/arlanda10/ValiderOperat ion"
style="document"/>
<wsdl:input>
<soap:body use="literal"/>
<soap:header message="tns:ValiderOperationAuthHeader" part="AuthHeader"
use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="consignity">
<wsdl:port name="consignitySoap" binding="tns:consignitySoap">
<soap:address
location="https://test.webservices.novea.fr/arlanda/consignity.asmx"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

And the testing adress :
https://test.webservices.novea.fr/arlanda/consignity.asmx

Does anyone know how to authentificate to the server ? Or maybe I'm
wrong for something else...
Thanks
Antoine
Re: Interoperability JAVA / .NET [message #171888 is a reply to message #168519] Wed, 21 June 2006 16:24 Go to previous message
Chris Brealey is currently offline Chris BrealeyFriend
Messages: 104
Registered: July 2009
Senior Member
--------------DF0F1738A41667953340428B
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Antoine,
when you wrote "I haven't the class AuthHeader which is in the WSDL", I take it
you mean no Java class corresponding to the AuthHeader global element was
generated, and no parameter appeared in the method corresponding to
ValiderOperation?

The reason is that the "ValiderOperationAuthHeader" message is a so-called
"implicit header" message. Messages bound to the soap:header in the soap:binding
are either implicit or explicit. Only explicit messages get mapped to parameters
of the methods of the Java service class. An explicit header message is any
message referenced by an operation in the portType. An implicit header message
is any message that is not referenced by an operation in the portType.

This may sound complex, but it's a consequence of one of JAX-RPC's more basic
rules - That the signature of your Java service endpoint interface is derived
from the portType, not the binding.

For implicit header messages, you will need to write a JAX-RPC handler to
manipulate its content. Have a look thru the Axis documentation for more
information [1].

Cheers - CB.

[1] http://ws.apache.org/axis/java/index.html

Antoine Rochefort wrote:

> Hello
> I'm trying to create a J2EE client for a webservice made whith .NET. I
> use Tomcat/Axis and the server uses IIS.
> I've generate webservices classes using the graphical tool of Eclipse WTP.
>
> I don't know how to put the auhtentification header.
>
> The problem is that when a generate classes from the WSDL, I haven't the
> class AuthHeader which is in the WSDL, and when I call the method
> validerOperation(...) the server returns : "--> The referenced object is
> not linked to an instancied object".
>
> Here is the WSDL :
>
> <wsdl:definitions
> targetNamespace="https://clients.webservices.novea.fr/arlanda10/">
> <wsdl:types>
> <s:schema elementFormDefault="qualified"
> targetNamespace="https://clients.webservices.novea.fr/arlanda10/">
> <s:element name="Ping">
> <s:complexType/>
> </s:element>
> <s:element name="PingResponse">
> <s:complexType/>
> </s:element>
> <s:element name="ValiderOperation">
> <s:complexType>
> <s:sequence>
> <s:element minOccurs="0" maxOccurs="1" name="numeroCommande"
> type="s:string"/>
> <s:element minOccurs="1" maxOccurs="1" name="codeCoursier" type="s:int"/>
> <s:element minOccurs="1" maxOccurs="1" name="retraitDepot"
> type="s:boolean"/>
> <s:element minOccurs="0" maxOccurs="1" name="consigne" type="s:string"/>
> </s:sequence>
> </s:complexType>
> </s:element>
> <s:element name="ValiderOperationResponse">
> <s:complexType>
> <s:sequence>
> <s:element minOccurs="1" maxOccurs="1" name="ValiderOperationResult"
> type="s:boolean"/>
> </s:sequence>
> </s:complexType>
> </s:element>
> <s:element name="AuthHeader" type="tns:AuthHeader"/>
> <s:complexType name="AuthHeader">
> <s:sequence>
> <s:element minOccurs="0" maxOccurs="1" name="Username" type="s:string"/>
> <s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string"/>
> <s:element minOccurs="0" maxOccurs="1" name="Langue" type="s:string"/>
> </s:sequence>
> </s:complexType>
> </s:schema>
> </wsdl:types>
> <wsdl:message name="PingSoapIn">
> <wsdl:part name="parameters" element="tns:Ping"/>
> </wsdl:message>
> <wsdl:message name="PingSoapOut">
> <wsdl:part name="parameters" element="tns:PingResponse"/>
> </wsdl:message>
> <wsdl:message name="ValiderOperationSoapIn">
> <wsdl:part name="parameters" element="tns:ValiderOperation"/>
> </wsdl:message>
> <wsdl:message name="ValiderOperationSoapOut">
> <wsdl:part name="parameters" element="tns:ValiderOperationResponse"/>
> </wsdl:message>
> <wsdl:message name="ValiderOperationAuthHeader">
> <wsdl:part name="AuthHeader" element="tns:AuthHeader"/>
> </wsdl:message>
> <wsdl:portType name="consignitySoap">
> <wsdl:operation name="Ping">
> <documentation>
> M
Previous Topic:How to get right hostname instead of "localhost" in a generated WSDL?
Next Topic:Generate Web Service Proxy...
Goto Forum:
  


Current Time: Fri Apr 26 02:33:53 GMT 2024

Powered by FUDForum. Page generated in 0.02928 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top