Hi Olivier, yes getPort should work for Java ports. Could you post your
WSDL for this?
...ant
Anthony Elder
[EMAIL PROTECTED]
Web Services Development
IBM UK Laboratories, Hursley Park
(+44) 01962 818320, x248320, MP208.
"Brand, Olivier" <[EMAIL PROTECTED]> on 12/03/2003 13:15:35
Please respond to [EMAIL PROTECTED]
To: <[EMAIL PROTECTED]>
cc: <[EMAIL PROTECTED]>
Subject: Error when retieving Java Port through the WSIF API
The following code throws a NullPointer Exception on any Java ports
described in a WSDL document. Is that operation (getPort) supported for
java ports ?
Definition wsdlDefinition = wsdlReader.readWSDL(wsdlLocation);
Service wsdlService = wsdlDefinition.getService(wsdlServiceQName);
WSIFService wsifService = wsifFactory.getService(wsdlDefinition,
wsdlService);
WSIFPort javaPort = wsifService.getPort(javaPortName);
Here is the error:
java.lang.NullPointerException
at org.apache.wsif.base.WSIFServiceImpl.createDynamicWSIFPort(Unknown
Source)
at org.apache.wsif.base.WSIFServiceImpl.getPort(Unknown Source)
at
com.vodafone.global.charging.client.JavaStubTest.testWSDLJavaPort(JavaStubTest.java:148)
at java.lang.reflect.Method.invoke(Native Method)
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.RemoteTestRunner.runTests(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:270)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:161)
And an extract of the createDynamicWSIFPort before the
NullPointerException:
element=[java:operation: null]
BindingOperation: name=getAddressFromName
BindingInput: name=GetAddressFromNameRequest
BindingOutput: name=GetAddressFromNameResponse
UnknownExtensibilityElement
({http://schemas.xmlsoap.org/wsdl/java/}operation):
required=null
element=[java:operation: null]
UnknownExtensibilityElement
({http://schemas.xmlsoap.org/wsdl/java/}binding):
required=null
element=[java:binding: null]
UnknownExtensibilityElement
({http://schemas.xmlsoap.org/wsdl/formatbinding/}typeMapping):
required=null
element=[format:typeMapping: null]
UnknownExtensibilityElement
({http://schemas.xmlsoap.org/wsdl/java/}address):
required=null
element=[java:address: null]
Olivier Brand