[JBossWS] - Wrong incomming SOAP not intercepted
by bossy
Could someone please tell me does JBoss enforce the restrictions put in the wsdl and how?
I have WS that runs under JBoss. In my wsdl I put a restriction on one of the elements to make sure that it's always present in the request:
<element name='mailbox' nillable='false' minOccurs="1" maxOccurs="1" type='string' />
I was expecting that in the unlikely event this element is missing from the request, this will be intercepted and an appropriate SOAP exception will be thrown, without me having to do anything.
The debug shows, though, that that's not the case.
The request is accepted and sent for processing, which of course fails, as there's missing information.
Do I need to do additional validation or am I right to think that JBoss should enforce the restrictions itself?
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005807#4005807
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005807
17 years, 11 months
[JBossWS] - Problem with ServiceEndpointInterceptor
by DuocSu
7:56:14,210 INFO [ServiceEndpointManager] WebService started: http://pippin1:8180/ejb/WebServiceP2H
17:57:04,101 WARN [DeserializationContextImpl] Ignoring invalid namespace mapping: [prefix=,uri=]
17:57:04,117 WARN [DeserializationContextImpl] Ignoring invalid namespace mapping: [prefix=,uri=]
17:57:04,398 ERROR [LogInterceptor] RuntimeException in method: public abstract int com.p2h.application.webservice.WebServiceP2H.add(int,int) throws java.rmi.RemoteException:
java.lang.NullPointerException
at org.jboss.ws.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:69)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
at org.jboss.ejb.Container.invoke(Container.java:954)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.webservice.server.InvokerProviderEJB.invokeServiceEndpoint(InvokerProviderEJB.java:144)
at org.jboss.webservice.server.InvokerProvider.invokeMethod(InvokerProvider.java:327)
at org.jboss.axis.providers.java.RPCProvider.invokeTarget(RPCProvider.java:176)
at org.jboss.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:121)
at org.jboss.axis.providers.java.JavaProvider.invoke(JavaProvider.java:358)
at org.jboss.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:73)
at org.jboss.axis.SimpleChain.doVisiting(SimpleChain.java:160)
at org.jboss.axis.SimpleChain.invoke(SimpleChain.java:123)
at org.jboss.axis.handlers.soap.SOAPService.invoke(SOAPService.java:560)
at org.jboss.webservice.server.ServerEngine.invokeInternal(ServerEngine.java:215)
at org.jboss.webservice.server.ServerEngine.invoke(ServerEngine.java:104)
at org.jboss.axis.transport.http.AxisServlet.doPost(AxisServlet.java:911)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.jboss.axis.transport.http.AxisServletBase.service(AxisServletBase.java:370)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Unknown Source)
17:57:04,554 ERROR [ServerEngine] Server error: AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
faultSubcode:
faultString: RuntimeException; nested exception is:
java.lang.NullPointerException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace: java.rmi.ServerException: RuntimeException; nested exception is:
java.lang.NullPointerException
at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:421)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:209)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
at org.jboss.ejb.Container.invoke(Container.java:954)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.webservice.server.InvokerProviderEJB.invokeServiceEndpoint(InvokerProviderEJB.java:144)
at org.jboss.webservice.server.InvokerProvider.invokeMethod(InvokerProvider.java:327)
at org.jboss.axis.providers.java.RPCProvider.invokeTarget(RPCProvider.java:176)
at org.jboss.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:121)
at org.jboss.axis.providers.java.JavaProvider.invoke(JavaProvider.java:358)
at org.jboss.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:73)
at org.jboss.axis.SimpleChain.doVisiting(SimpleChain.java:160)
at org.jboss.axis.SimpleChain.invoke(SimpleChain.java:123)
at org.jboss.axis.handlers.soap.SOAPService.invoke(SOAPService.java:560)
at org.jboss.webservice.server.ServerEngine.invokeInternal(ServerEngine.java:215)
at org.jboss.webservice.server.ServerEngine.invoke(ServerEngine.java:104)
at org.jboss.axis.transport.http.AxisServlet.doPost(AxisServlet.java:911)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.jboss.axis.transport.http.AxisServletBase.service(AxisServletBase.java:370)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at org.jboss.ws.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:69)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
... 45 more
17:57:04,554 INFO [AxisServlet] java.rmi.ServerException: RuntimeException; nested exception is:
java.lang.NullPointerException
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005722#4005722
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005722
17 years, 11 months
[JBossWS] - NullCountedPointer exception from WSDL11Reader
by wpower
I am trying to migrate an Axis based web service to JBoss. JBossws fails processing the existing web services .wsdl file. The problem is caused by the <wsdl:fault > tag. Does anyone know if there is a fix for this problem.
Error message:
20:39:44,590 WARN [WSDL11Reader] Unsupported fault message part in message: {http://www.testnet.com/test/intf}ProvApiException
20:39:44,600 WARN [WSDL11Reader] Unsupported fault message part in message: {http://www.testnet.com/test/intf}ProvApiException
Exception in thread "main" java.lang.NullPointerException
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processOperationInput(WSDL11Reader.java:474)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processPortTypeOperations(WSDL11Reader.java:460)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processPortType(WSDL11Reader.java:446)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processBinding(WSDL11Reader.java:728)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processPort(WSDL11Reader.java:1071)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processPorts(WSDL11Reader.java:1054)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processServices(WSDL11Reader.java:1027)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processDefinition(WSDL11Reader.java:119)
at org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:145)
at org.jboss.ws.tools.WSDLToJava.convertWSDL2Java(WSDLToJava.java:120)
at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(ToolsHelper.java:324)
at org.jboss.ws.tools.WSTools.process(WSTools.java:138)
at org.jboss.ws.tools.WSTools.generate(WSTools.java:120)
at org.jboss.ws.tools.WSTools.main(WSTools.java:61)
.wsdl file
<?xml version="1.0" encoding="UTF-8"?>
| <!--"V06.01.02R000""Patch 1"-->
| <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://www.testnet.com/test/intf" xmlns:intf="http://www.testnet.com/test/intf" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="http://www.testnet.com/test/model" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.testnet.com/test/intf">
| <wsdl:types>
| <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.testnet.com/test/model"><import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
| <complexType name="ManagedEntityKey">
| <sequence/>
| </complexType>
|
| <complexType name="ProvApiException">
| <sequence>
| <element name="errorCode" nillable="true" type="xsd:string"/>
| <element name="message" nillable="true" type="xsd:string"/>
| <element name="rootCause" nillable="true" type="xsd:string"/>
| </sequence>
| </complexType>
|
| <complexType name="SubscriberKey">
| <complexContent>
| <extension base="tns1:ManagedEntityKey">
| <sequence>
| <element name="subscriberId" nillable="true" type="xsd:string"/>
| <element name="countryId" nillable="true" type="xsd:string"/>
| <element name="owningCarrierId" nillable="true" type="xsd:string"/>
| </sequence>
| </extension>
| </complexContent>
| </complexType>
|
| </schema></wsdl:types>
|
| <wsdl:message name="createResponse">
|
| </wsdl:message>
|
| <wsdl:message name="createResponse1">
|
| </wsdl:message>
|
| <wsdl:message name="createRequest1">
|
| <wsdl:part name="in0" type="xsd:string"/>
|
| <wsdl:part name="in1" type="impl:ArrayOf_tns1_ManagedEntityValue"/>
|
| <wsdl:part name="in2" type="xsd:boolean"/>
|
| </wsdl:message>
|
| <wsdl:message name="ProvApiException">
|
| <wsdl:part name="fault" type="tns1:ProvApiException"/>
|
| </wsdl:message>
|
| <wsdl:portType name="API">
|
| <wsdl:operation name="create" parameterOrder="in0 in1">
|
| <wsdl:input message="impl:createRequest" name="createRequest"/>
|
| <wsdl:output message="impl:createResponse" name="createResponse"/>
|
| <wsdl:fault message="impl:ProvApiException" name="ProvApiException"/>
|
| </wsdl:operation>
|
| <wsdl:operation name="create" parameterOrder="in0 in1 in2">
|
| <wsdl:input message="impl:createRequest1" name="createRequest1"/>
|
| <wsdl:output message="impl:createResponse1" name="createResponse1"/>
|
| <wsdl:fault message="impl:ProvApiException" name="ProvApiException"/>
|
| </wsdl:operation>
|
| </wsdl:portType>
|
| <wsdl:binding name="APISoapBinding" type="impl:API">
|
| <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
|
| <wsdl:operation name="create">
|
| <wsdlsoap:operation soapAction=""/>
|
| <wsdl:input name="createRequest">
|
| <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.testnet.com/test/intfintf" use="encoded"/>
|
| </wsdl:input>
|
| <wsdl:output name="createResponse">
|
| <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.testnet.com/test/intfintf" use="encoded"/>
|
| </wsdl:output>
|
| <wsdl:fault name="ProvApiException">
|
| <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.testnet.com/test/intfintf" use="encoded"/>
|
| </wsdl:fault>
|
| </wsdl:operation>
|
| <wsdl:operation name="create1">
|
| <wsdlsoap:operation soapAction=""/>
|
| <wsdl:input name="createRequest1">
|
| <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.testnet.com/test/intfintf" use="encoded"/>
|
| </wsdl:input>
|
| <wsdl:output name="createResponse1">
|
| <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.testnet.com/test/intfintf" use="encoded"/>
|
| </wsdl:output>
|
| <wsdl:fault name="ProvApiException">
|
| <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.testnet.com/test/intfintf" use="encoded"/>
|
| </wsdl:fault>
|
| </wsdl:operation>
|
| </wsdl:binding>
|
| <wsdl:service name="Service">
|
| <wsdl:port binding="impl:APISoapBinding" name="APIPort">
|
| <wsdlsoap:address location="http://localhost:8080/API"/>
|
| </wsdl:port>
|
| </wsdl:service>
|
| </wsdl:definitions>
|
|
| [/code]
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005595#4005595
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005595
17 years, 11 months
[JBossWS] - Re: wstools Duplicate operation with name ...
by wpower
I am getting the following error while trying to generate JbossWS artifacts from a .wsdl file. The .wsdl file is from an existing Axis based application, and I am trying to migrate it to JBoss.
Does anyone know if the problem is with the .wsdl or wstools or the settings passed to wstools.
Thanks.
Running JBossWS wstools for [PSXAPI_r06_03]
directory: C:\jboss-4.0.5.GA\bin
command: cmd.exe /C wstools.bat -config C:\DOCUME~1\POWER~1.WIL\LOCALS~1\Temp\wstools-config18085.xml -dest C:\jide\Test\src
========================================================================="
.
WSTools Environment
.
JBOSS_HOME: C:\jboss-4.0.5.GA\bin\\..
.
JAVA: C:\Program Files\Java\jdk1.5.0_09\\bin\java
.
JAVA_OPTS:
.
========================================================================="
.
Exception in thread "main" java.lang.IllegalArgumentException: Duplicate operation with name=delete, found in portType '{http://www.testnet.com/test/intf}PSXAPI/r06_03SoapBinding'.
at com.ibm.wsdl.BindingImpl.getBindingOperation(BindingImpl.java:224)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.messagePartToElementName(WSDL11Reader.java:652)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processOperationInput(WSDL11Reader.java:487)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processPortTypeOperations(WSDL11Reader.java:460)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processPortType(WSDL11Reader.java:446)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processBinding(WSDL11Reader.java:728)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processPort(WSDL11Reader.java:1071)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processPorts(WSDL11Reader.java:1054)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processServices(WSDL11Reader.java:1027)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processDefinition(WSDL11Reader.java:119)
at org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:145)
at org.jboss.ws.tools.WSDLToJava.convertWSDL2Java(WSDLToJava.java:120)
at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(ToolsHelper.java:324)
at org.jboss.ws.tools.WSTools.process(WSTools.java:138)
at org.jboss.ws.tools.WSTools.generate(WSTools.java:120)
at org.jboss.ws.tools.WSTools.main(WSTools.java:61)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005416#4005416
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005416
17 years, 11 months