Paul,
Please try to use tcpmon [1]. Basically you will have to run tcpmon
listen on a port, forward the requests to your actual web service. And
in your code you will have to use the other constructor for
ExampleService_ServiceLocator which takes a url. this url should point
to your tcpmon ip address/port. I believe, your web service is
returning your a html page with some error information and not a soap
fault for whatever reason.
-- dims
On 3/16/07, Paul Miller <[EMAIL PROTECTED]> wrote:
One more desperate plea:
I submitted this question early in week, but received no reply. Perhaps my
question was one I should have found answered in docs or archives or google
– but I simply have not yet. I hate to give up on Axis – I feel I am 99%
there and need only a little hint, but I'm stating to think I should try
another path, another package. Is there anybody out there who could take a
quick peek at my dozen lines of code and maybe the first few lines of stack
trace and throw this starving hacker a few crumbs? J
Thank You O Merciful Axis-Gurus! (I'm not worthy! I'm not worthy!)
Paul Miller
I'm new to Axis – 'bout a week – I'm attempting to connect to a 3rd-party
webservice running on my localhost. I've gen'd the files using wsdl2java,
and everything compiles and runs up to the actual "response =
portType.calculateSquareRoot(request);" call, when I get the "No request
found in SOAP envelope". I know the webservice is OK because same basic C#
program works. My project links to all the axis jars in axis_1_4 + xerces
-2_9_0. I'll include the simple code snippet and pertinent stack trace.
(I've been googling on this for days + looked thru archives but couldn't
find the right clue). Can anybody help? Or give me pointers to how I might
track this down in debugger?
Thanks!
Paul Miller
Code:
try {
// inputNum comes from user-entered value in TextField
double inputNum = Double.parseDouble(inputTextField.getText());
// default value until webservice caclulates it
double outputNum = 0;
// create the webservice obj with the ServiceLocator
ExampleService_Service theService = new
ExampleService_ServiceLocator();
// get the port-type obj from theService - we make the calls to
this obj
ExampleService_PortType portType = theService.
getExampleService();
// create a request obj to hold all input and in/out params
CalculateSquareRootRequest request = new
CalculateSquareRootRequest();
// response obj will hold results of service invocation
CalculateSquareRootResponse response = null;
request.setTheNumber(inputNum); // set in/out param "TheNumber"
// this makes the call with the request obj as in params and we
get response obj back
response = portType.calculateSquareRoot(request);
// extract output value of inout param "TheNumber" from response
outputNum = response.getTheNumber();
// just display it
outputTextField.setText("" + outputNum);
} catch (Exception e) {
System.err.println("Execution failed. Exception: " + e );
e.printStackTrace();
}
Stack Trace
Execution failed. Exception: No request found in SOAP envelope
AxisFault
faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server
faultSubcode:
faultString: No request found in SOAP envelope
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:No request
found in SOAP envelope
at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at
org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source)
at
org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at
org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at
org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at
org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at
org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at
org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at
org.apache.axis.client.Call.invoke(Call.java:2767)
at
org.apache.axis.client.Call.invoke(Call.java:2443)
at
org.apache.axis.client.Call.invoke(Call.java:2366)
at
org.apache.axis.client.Call.invoke(Call.java:1812)
at
com.aimms.www.generated_namespaces.ExampleService.ExampleServiceHandlerSOAPBindingStub.calculateSquareRoot(ExampleServiceHandlerSOAPBindingStub.java:216)
at
javaaimmsexample.MainFrame.doSqrt(MainFrame.java:54)
etc
--
Paul Miller
Applied Optimization, LLC
812.853.9544
812.431.1075
[EMAIL PROTECTED]
www.applied-optimization.com
--
Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]