469,924 Members | 1,365 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,924 developers. It's quick & easy.

cannot get a reploy from a dotnet2 web service

hi...
i'm trying to use axis2 to call a dotnet web service..
public class Service : System.Web.Services.WebService
{
public Service () {}

[WebMethod]
public string HelloWorld() {
return "Hello World";
}

}

the java code is this:

public static String execute(final String endPoint,final String
serviceNS,final String method,Object[] prms) throws AxisFault{

RPCServiceClient client=new RPCServiceClient();
client.getOptions().setAction(serviceNS+method);

client.setTargetEPR(new EndpointReference(endPoint));
return client.invokeBlocking(new QName(serviceNS,method),
prms).toString();
}

the soap request looks like this:

<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/
envelope/">
<soapenv:Body>
<HelloWorld xmlns="http://tempuri.org/" />
</soapenv:Body>
</soapenv:Envelope>

http headers:

<HTTPHeaders>
<content-type>text/xml; charset=UTF-8</content-type>
<soapaction>"http://tempuri.org/HelloWorld"</soapaction>
<user-agent>Axis2</user-agent>
<host>localhost</host>
<transfer-encoding>chunked</transfer-encoding>
</HTTPHeaders>

but i get an AxisFault: The input stream for an incoming message is
null.

i've placed a break point on the server, and i see the service is not
being activated at all. what am i missing?

Aug 14 '07 #1
3 1910
<el********@gmail.comwrote in message
news:11*********************@g4g2000hsf.googlegrou ps.com...
hi...
i'm trying to use axis2 to call a dotnet web service..
public class Service : System.Web.Services.WebService
{
public Service () {}

[WebMethod]
public string HelloWorld() {
return "Hello World";
}

}

the java code is this:

public static String execute(final String endPoint,final String
serviceNS,final String method,Object[] prms) throws AxisFault{

RPCServiceClient client=new RPCServiceClient();
client.getOptions().setAction(serviceNS+method);

client.setTargetEPR(new EndpointReference(endPoint));
return client.invokeBlocking(new QName(serviceNS,method),
prms).toString();
}

the soap request looks like this:

<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/
envelope/">
<soapenv:Body>
<HelloWorld xmlns="http://tempuri.org/" />
</soapenv:Body>
</soapenv:Envelope>

http headers:

<HTTPHeaders>
<content-type>text/xml; charset=UTF-8</content-type>
<soapaction>"http://tempuri.org/HelloWorld"</soapaction>
<user-agent>Axis2</user-agent>
<host>localhost</host>
<transfer-encoding>chunked</transfer-encoding>
</HTTPHeaders>

but i get an AxisFault: The input stream for an incoming message is
null.

i've placed a break point on the server, and i see the service is not
being activated at all. what am i missing?
You seem to be missing a diagnostic strategy.

Your problem could be anything at all. Are the packets even reaching the
server? Is the web site hosting the service configured correctly?

You might have some luck using a product like soapUI (from
http://www.soapUI.org which can send and receive messages to/from a web
service and can also log the HTTP traffic during the operations.
Alternatively, look at the network traffic with something like TCPTrace
(http://www.pocketsoap.org).
--
John Saunders [MVP]

Aug 14 '07 #2
i'm pretty sure they reach the sever, i'm axis 2 as the client and
casini as the webserver, prior do that i got an excpetion saying the
server didn't recgonize the soap action (it was the default urn:Block
something) once i changed the soap action to namespace of the
webservice along with the operaiton itself i got this error.

i allready attempted to use the axis2 client to axis server and
succseeded, using net client to net server also worked, as trace i'm
using the one that came with soaptoolkit, and was able to compare the
request (from net client and axis net) and they seem the same
(although net client had more namespaces which were not used like
xsi).
On Aug 15, 1:58 am, "John Saunders [MVP]" <john.saunders at
trizetto.comwrote:
<elh.maa...@gmail.comwrote in message

news:11*********************@g4g2000hsf.googlegrou ps.com...


hi...
i'm trying to use axis2 to call a dotnet web service..
public class Service : System.Web.Services.WebService
{
public Service () {}
[WebMethod]
public string HelloWorld() {
return "Hello World";
}
}
the java code is this:
public static String execute(final String endPoint,final String
serviceNS,final String method,Object[] prms) throws AxisFault{
RPCServiceClient client=new RPCServiceClient();
client.getOptions().setAction(serviceNS+method);
client.setTargetEPR(new EndpointReference(endPoint));
return client.invokeBlocking(new QName(serviceNS,method),
prms).toString();
}
the soap request looks like this:
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/
envelope/">
<soapenv:Body>
<HelloWorld xmlns="http://tempuri.org/" />
</soapenv:Body>
</soapenv:Envelope>
http headers:
<HTTPHeaders>
<content-type>text/xml; charset=UTF-8</content-type>
<soapaction>"http://tempuri.org/HelloWorld"</soapaction>
<user-agent>Axis2</user-agent>
<host>localhost</host>
<transfer-encoding>chunked</transfer-encoding>
</HTTPHeaders>
but i get an AxisFault: The input stream for an incoming message is
null.
i've placed a break point on the server, and i see the service is not
being activated at all. what am i missing?

You seem to be missing a diagnostic strategy.

Your problem could be anything at all. Are the packets even reaching the
server? Is the web site hosting the service configured correctly?

You might have some luck using a product like soapUI (fromhttp://www.soapUI.orgwhich can send and receive messages to/from a web
service and can also log the HTTP traffic during the operations.
Alternatively, look at the network traffic with something like TCPTrace
(http://www.pocketsoap.org).
--
John Saunders [MVP]- Hide quoted text -

- Show quoted text -

Aug 15 '07 #3
<el********@gmail.comwrote in message
news:11*********************@r29g2000hsg.googlegro ups.com...
i'm pretty sure they reach the sever, i'm axis 2 as the client and
casini as the webserver, prior do that i got an excpetion saying the
server didn't recgonize the soap action (it was the default urn:Block
something) once i changed the soap action to namespace of the
webservice along with the operaiton itself i got this error.

i allready attempted to use the axis2 client to axis server and
succseeded, using net client to net server also worked, as trace i'm
using the one that came with soaptoolkit, and was able to compare the
request (from net client and axis net) and they seem the same
(although net client had more namespaces which were not used like
xsi).
I would compare the two very closely, especially including the use of
namespaces.
--
John Saunders [MVP]

Aug 15 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by caldera | last post: by
4 posts views Thread by Chris | last post: by
7 posts views Thread by George Jordanov Ivanov | last post: by
10 posts views Thread by dermot | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.