I'm getting the following error using the latest version of Java Axis:
org.apache.axis2.AxisFault: Server was unable to process request. --->
Invalid URI: The format of the URI could not be determined. (see
appendix for details)
The code I'm using employs generated ADB classes and looks something
like this:
public void testBadGetLoginKey() throws Exception {
ServiceServiceSoapStub stub = new
ServiceServiceSoapStub(BRIDGE_URL);
// set it to use the default SOAP message wrapper used by .net
stub._getServiceClient().getOptions().setSoapVersionURI(SOAP11Constants.
SOAP_ENVELOPE_NAMESPACE_URI);
// turn off chunked messaging which isn't supported by IIS
//TODO change this to the newer constant settings supported by
AXIS2
stub._getServiceClient().getOptions().setProperty(MessageContextConstant
s.CHUNKED,
Constants.VALUE_FALSE);
// Create the GetLoginKey IN message, setting parameters
ServiceServiceSoapStub.GetLoginKey glk = new
ServiceServiceSoapStub.GetLoginKey();
glk.setCompany("MCAO");
glk.setUserId("furashg");
glk.setPassword("badpasswd");
// Call the service and block for the response
ServiceServiceSoapStub.GetLoginKeyResponse resp =
stub.GetLoginKey(glk);
// Parse the response as a reply message
ServiceServiceSoapStub.LoginKeyReturn glkr =
resp.getGetLoginKeyResult();
assertTrue(glkr.getStatus().getIsError());
assertEquals(glkr.getStatus().getErrorMessage(), "Invalid
login");
}
At runtime, it generates an HTTP request that, in the POST, has
"Request URI: /ObjAcctBridgeMsWs/Service.asmx"
The .net service it is expecting wants:
POST /ObjAcctBridgeMSWs/Service.asmx HTTP/1.1
Host: mcaosappstest
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://mcao.maricopa.gov/GetLoginKey"
Which looks like what it's getting sent, except it's sending
"Content-Length: 336", instead of "Content-Length:length")
=Appendix 1: Stack Trace=
org.apache.axis2.AxisFault: Server was unable to process request. --->
Invalid URI: The format of the URI could not be determined.
at
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java
:434)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper
ation.java:373)
at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO
peration.java:294)
at
gov.maricopa.mcao.ServiceServiceSoap12Stub.GetLoginKey(ServiceServiceSoa
p12Stub.java:571)
at
gov.maricopa.mcao.objacct.ObjAcctBridgeTest.testBadGetLoginKey(ObjAcctBr
idgeTest.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUn
it3TestReference.java:128)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.ja
va:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe
stRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe
stRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRun
ner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRu
nner.java:196)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]