Using Java WS from .NET, Anyone got it to work ?

D

Dave Brown

Hi all,

I'm having a real problem trying to write a webservice that I can call
from .NET. I use Netbeans 4.1 and until recently used Tomcat as my App
Server, but since wanting to try and do some webservices decided to give
Sun's App Server a go. So far so good, everything including jdbc seems
to work ok after a bit of messing But anyway..

I created a webservice in netbeans called UpdateService, as eventually
it will help me with live updates of a package i'm writing.

For testing I decided the most simple of functions a Hello function.

code:

public String Hello(java.lang.String LastUpdate) {
return "World";
}


I just want to call the Hello function and have it return "World".

However I dont think its creating the WSDL correctly as the String
parameter above does not show as a String parameter though .Net, rather
it thinks it is of type 'Hello' not of type 'String'.

I'll paste the generated WSDL below, I would really appreciate any
assistance or any thoughts of what stage is going wrong. BTW I'm using
JWSDP v1.6 with Sun App Server 8.1
So any thoughts at all anyone ?, From what I've read so far, the JWDSP
generates RPC style encoding where as .NET requires docliteral encoding,
however when I checked the wscompile line, there is a
-features:documentliteral parameter so i'm totally at a loss.

Thanks in advance..

WSDL ;

<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:tns="urn:UpdateService/types"
xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="urn:UpdateService/types">
<complexType name="Hello">
<sequence>
<element name="String_1" type="string"
nillable="true"/></sequence></complexType>
<complexType name="HelloResponse">
<sequence>
<element name="result" type="string"
nillable="true"/></sequence></complexType>

<element name="Hello" type="tns:Hello"/>
<element name="HelloResponse" type="tns:HelloResponse"/></schema></types>
<message name="UpdateServiceSEI_Hello">
<part name="parameters" element="ns2:Hello"/></message>
<message name="UpdateServiceSEI_HelloResponse">
<part name="result" element="ns2:HelloResponse"/></message>
<portType name="UpdateServiceSEI">
<operation name="Hello">
<input message="tns:UpdateServiceSEI_Hello"/>

<output
message="tns:UpdateServiceSEI_HelloResponse"/></operation></portType>
<binding name="UpdateServiceSEIBinding" type="tns:UpdateServiceSEI">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
<operation name="Hello">
<soap peration soapAction=""/>
<input>
<soap:body use="literal"/></input>
<output>
<soap:body use="literal"/></output></operation></binding>

<service name="UpdateService">
<port name="UpdateServiceSEIPort" binding="tns:UpdateServiceSEIBinding">
<soap:address location="http://INSP9100:8080/DiveSites/UpdateService"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/></port></service></definitions>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,113
Latest member
Vinay KumarNevatia
Top