[JBossWS] - A problem with complexType
by david.edery
Hello
I'v created a webservice using the following technologies:
jboss-4.0.5.GA
jbossws-native-2.0.0.GA
jdk1.5.0_09
At first, the webservice had only simple-type-parameter functions and everything worked well (deployment and usage of the webservice)
When i tried (for stress purposes) to add a complex (a class) as a parameter to the stress function, the client i'v created did not succeed in creating the webservice anymore telling me that it can't find the class i'm using.
I'v taken a step back, and created (using the wsconsume tool) the relevant code for my application, and used the generated code in the server and client side. It didn't help.
Below you can find the exception thrown at the client side and the .wsdl file which is loaded directly from JBoss (using the http://localhost:8080/myTest/Topology?wsdl address).
If more information is needed, i'd be happy to supply it.
I can really use some help about that.
Thanks allot
David Edery.
The exception from the client:
| org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://myTest/}myType
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.buildInputParameter(JAXRPCMetaDataBuilder.java:266)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.buildParameterMetaDataRpc(JAXRPCMetaDataBuilder.java:566)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.setupOperationsFromWSDL(JAXRPCMetaDataBuilder.java:210)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaDataInternal(JAXRPCClientMetaDataBuilder.java:217)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:134)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:86)
| at org.jboss.ws.core.jaxrpc.client.ServiceImpl.<init>(ServiceImpl.java:111)
| at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
| at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:128)
| at topologyClient.Client.createWebServiceInterface(Client.java:24)
| at topologyClient.Client.checkWebServiceInterface(Client.java:130)
|
The wsdl file:
| <definitions name='TopologyService' targetNamespace='http://myTest/' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://myTest/' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
| <types>
| <xs:schema targetNamespace='http://myTest/' version='1.0' xmlns:tns='http://myTest/' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
| <xs:complexType name='MyType'>
| <xs:sequence>
| <xs:element minOccurs='0' name='_str' type='xs:string'/>
| <xs:element name='_lng' type='xs:long'/>
| <xs:element name='_bool' type='xs:boolean'/>
| <xs:element minOccurs='0' name='_myType' type='tns:MyType'/>
| </xs:sequence>
| </xs:complexType>
| </xs:schema>
| </types>
|
| <message name='ITopologyWebservice_stressCheckComplexResponse'>
| <part name='return' type='tns:MyType'></part>
| </message>
|
| <message name='ITopologyWebservice_stressCheckComplex'>
| <part name='my_type' type='tns:MyType'></part>
| </message>
|
| <message name='ITopologyWebservice_stressCheck'>
| <part name='initiator' type='xsd:string'></part>
| </message>
|
| <message name='ITopologyWebservice_stressCheckResponse'>
| <part name='return' type='xsd:long'></part>
| </message>
|
| <portType name='ITopologyWebservice'>
| <operation name='stressCheck' parameterOrder='initiator'>
| <input message='tns:ITopologyWebservice_stressCheck'></input>
| <output message='tns:ITopologyWebservice_stressCheckResponse'></output>
| </operation>
|
| <operation name='stressCheckComplex' parameterOrder='my_type'>
| <input message='tns:ITopologyWebservice_stressCheckComplex'></input>
| <output message='tns:ITopologyWebservice_stressCheckComplexResponse'></output>
| </operation>
| </portType>
|
| <binding name='ITopologyWebserviceBinding' type='tns:ITopologyWebservice'>
| <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
| <operation name='stressCheck'>
| <soap:operation soapAction=''/>
| <input>
| <soap:body namespace='http://myTest/' use='literal'/>
| </input>
| <output>
| <soap:body namespace='http://myTest/' use='literal'/>
| </output>
| </operation>
| <operation name='stressCheckComplex'>
| <soap:operation soapAction=''/>
| <input>
| <soap:body namespace='http://myTest/' use='literal'/>
| </input>
| <output>
| <soap:body namespace='http://myTest/' use='literal'/>
| </output>
| </operation>
| </binding>
|
| <service name='TopologyService'>
| <port binding='tns:ITopologyWebserviceBinding' name='TopologyPort'>
| <soap:address location='http://localhost:8080/myTest/Topology'/>
| </port>
| </service>
|
| </definitions>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072189#4072189
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072189
18 years, 8 months
[JBossWS] - ArrayIndexOutOfBoundsException with wstools in jboss 2.0
by matt_law
I am trying to generate client stubs from a 3rd party WSDL. I am running jboss ws 2.0.0 GA on jboss 4.0.5 with jboss ejb 3.0 rc9 installed. I invoke the wstools task through ant. Initially I got the following error
| Caused by: org.jboss.ws.WSException: [JAX-RPC 2.3.1.2] Unable to unwrap model group with multiple particles.
| at org.jboss.ws.tools.helpers.ReturnTypeUnwrapper.unwrapModelGroup(ReturnTypeUnwrapper.java:120)
| at org.jboss.ws.tools.helpers.ReturnTypeUnwrapper.unwrap(ReturnTypeUnwrapper.java:87)
| at org.jboss.ws.tools.WSDLToJava.getReturnType(WSDLToJava.java:696)
| at org.jboss.ws.tools.WSDLToJava.appendDocParameters(WSDLToJava.java:401)
| at org.jboss.ws.tools.WSDLToJava.appendMethods(WSDLToJava.java:290)
| at org.jboss.ws.tools.WSDLToJava.createSEIFile(WSDLToJava.java:650)
| at org.jboss.ws.tools.WSDLToJava.createSEI(WSDLToJava.java:682)
| at org.jboss.ws.tools.WSDLToJava.generateSEI(WSDLToJava.java:185)
| at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(ToolsHelper.java:303)
| at org.jboss.ws.tools.WSTools.process(WSTools.java:147)
| at org.jboss.ws.tools.WSTools.generate(WSTools.java:69)
| at org.jboss.ws.tools.WSTools.generate(WSTools.java:123)
| at org.jboss.ws.tools.ant.wstools.execute(wstools.java:101)
|
I added the attribute parameter-style="bare" to the wsdl config, and re ran wstools, and got this
| java.lang.ArrayIndexOutOfBoundsException: 0
| at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(ToolsHelper.java:313)
| at org.jboss.ws.tools.WSTools.process(WSTools.java:147)
| at org.jboss.ws.tools.WSTools.generate(WSTools.java:69)
| at org.jboss.ws.tools.WSTools.generate(WSTools.java:123)
| at org.jboss.ws.tools.ant.wstools.execute(wstools.java:101)
| at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
| at org.apache.tools.ant.Task.perform(Task.java:364)
| at org.apache.tools.ant.Target.execute(Target.java:341)
| at org.apache.tools.ant.Target.performTasks(Target.java:369)
| at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
| at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
| at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
| at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
| at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
| at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
| at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
|
What can I do to fix it ? I can't change the wsdl, it's not something I've got ownership of.
I don't understand what part of the WSDL is causing the problem either.
I've read in JIRA that focus is being applied to jaxws, and this might not get fixed. Is this the case ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072031#4072031
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072031
18 years, 8 months
[JBossWS] - Re: JBossWS with JBoss 4.2.0 and Axis 1.4 don't work with WS
by iantonijevic
Yes, I use wss4j and Axis.
Now, i change Key identifier type from:
builder.setKeyIdentifierType(WSConstants.ISSUER_SERIAL);
to:
builder.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);
Now I get new error, but signature verification is successful.
I have in server.log:
2007-08-07 13:23:41,899 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Enter: handleIn BoundMessage
2007-08-07 13:23:41,899 DEBUG [org.jboss.ws.extensions.security.SecurityStore] loadStore: file:/C:/jboss-4.2.0.GA/server/default/tmp/deploy/tmp64291jaxws-samples-wssecurity-sign-exp.war/WEB-INF/wsse.keystore
2007-08-07 13:23:41,899 DEBUG [org.jboss.ws.extensions.security.SecurityStore] loadStore: file:/C:/jboss-4.2.0.GA/server/default/tmp/deploy/tmp64291jaxws-samples-wssecurity-sign-exp.war/WEB-INF/wsse.truststore
2007-08-07 13:23:41,899 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] -----------------------------------
2007-08-07 13:23:41,899 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] Transitioning from XML_VALID to DOM_VALID
2007-08-07 13:23:41,899 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] -----------------------------------
2007-08-07 13:23:41,899 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] -----------------------------------
2007-08-07 13:23:41,899 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] Transitioning from XML_VALID to DOM_VALID
2007-08-07 13:23:41,899 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] -----------------------------------
2007-08-07 13:23:41,899 INFO [org.apache.xml.security.signature.Reference] Verification successful for URI "#id-32801378"
2007-08-07 13:23:41,915 DEBUG [org.jboss.ws.core.soap.SOAPMessageDispatcher] getDispatchDestination: null
2007-08-07 13:23:41,915 ERROR [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Exception during handler processing
java.lang.NullPointerException
at org.jboss.ws.extensions.security.WSSecurityDispatcher.handleInbound(WSSecurityDispatcher.java:159)
at org.jboss.ws.extensions.security.jaxws.WSSecurityHandler.handleInboundSecurity(WSSecurityHandler.java:78)
at org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerServer.handleInbound(WSSecurityHandlerServer.java:41)
at org.jboss.ws.core.jaxws.handler.GenericHandler.handleMessage(GenericHandler.java:55)
at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:295)
at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:140)
at org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS.callRequestHandlerChain(HandlerDelegateJAXWS.java:87)
at org.jboss.ws.core.server.AbstractServiceEndpointInvoker.callRequestHandlerChain(AbstractServiceEndpointInvoker.java:112)
at org.jboss.ws.core.server.AbstractServiceEndpointInvoker.invoke(AbstractServiceEndpointInvoker.java:162)
at org.jboss.ws.core.server.ServiceEndpoint.processRequest(ServiceEndpoint.java:212)
at org.jboss.ws.core.server.ServiceEndpointManager.processRequest(ServiceEndpointManager.java:448)
at org.jboss.ws.core.server.AbstractServiceEndpointServlet.doPost(AbstractServiceEndpointServlet.java:114)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at org.jboss.ws.core.server.AbstractServiceEndpointServlet.service(AbstractServiceEndpointServlet.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
2007-08-07 13:23:41,915 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Exit: handleIn BoundMessage with status: false
2007-08-07 13:23:41,915 DEBUG [org.jboss.ws.core.jaxws.handler.MessageContextJAXWS] Begin response processing
2007-08-07 13:23:41,915 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation] popMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@f2a0ef (Thread http-127.0.0.1-8080-2)
2007-08-07 13:23:41,915 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation] pushMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@3fcfb (Thread http-127.0.0.1-8080-2)
2007-08-07 13:23:41,915 ERROR [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] SOAP request exception
javax.xml.ws.WebServiceException: java.lang.NullPointerException
at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.processHandlerFailure(HandlerChainExecutor.java:276)
at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:155)
at org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS.callRequestHandlerChain(HandlerDelegateJAXWS.java:87)
at org.jboss.ws.core.server.AbstractServiceEndpointInvoker.callRequestHandlerChain(AbstractServiceEndpointInvoker.java:112)
at org.jboss.ws.core.server.AbstractServiceEndpointInvoker.invoke(AbstractServiceEndpointInvoker.java:162)
at org.jboss.ws.core.server.ServiceEndpoint.processRequest(ServiceEndpoint.java:212)
at org.jboss.ws.core.server.ServiceEndpointManager.processRequest(ServiceEndpointManager.java:448)
at org.jboss.ws.core.server.AbstractServiceEndpointServlet.doPost(AbstractServiceEndpointServlet.java:114)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at org.jboss.ws.core.server.AbstractServiceEndpointServlet.service(AbstractServiceEndpointServlet.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException
at org.jboss.ws.extensions.security.WSSecurityDispatcher.handleInbound(WSSecurityDispatcher.java:159)
at org.jboss.ws.extensions.security.jaxws.WSSecurityHandler.handleInboundSecurity(WSSecurityHandler.java:78)
at org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerServer.handleInbound(WSSecurityHandlerServer.java:41)
at org.jboss.ws.core.jaxws.handler.GenericHandler.handleMessage(GenericHandler.java:55)
at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:295)
at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:140)
... 27 more
....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071557#4071557
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071557
18 years, 9 months
[JBossWS] - Re: JBoss 4.0.x migration to 4.2.x
by dlgrasse
Thanks for the idea. I removed the existing jbossws.sar dir in JBoss4.2.1, and installed JBoss2.0.0GA via the ant script, but got the same results.
Troubleshooting this as if it were strictly an XML validation issue, I was able to remove the error mentioned in the first post. A second issue persisted though (org.jboss.ws.WSException: Cannot obtain java type mapping for {some wsdl schema type}). I was hoping it was caused by the schema error, but unfortunately it wasn't.
Working through this problem I was able to resolve it by changing the contents of the jaxrpc-mapping file. Originally the java-xml-type-mapping's were mapping the wsdl element names to Java types. I had to change them to the schema types to get it to work. Here's an example of what I did:
jaxrpc-mapping.xml
| <java-xml-type-mapping>
| <java-type>{mapped Java type}</java-type>
|
| <!--root-type-qname>impl:getReflistsRequest</root-type-qname>
| <qname-scope>element</qname-scope-->
|
| <root-type-qname>tns1:ReflistsInput</root-type-qname>
| <qname-scope>complexType</qname-scope>
| </java-xml-type-mapping>
|
In my wsdl file is the following in the wsdl:types section:
| <wsdl:types>
| <schema xmlns='http://www.w3.org/2001/XMLSchema'
| targetNamespace='{impl namespace}'
| elementFormDefault='qualified'
| >
| <import namespace='{tns1 namespace}' schemaLocation='{schema file}'/>
|
| <element name='getReflistsRequest' type='tns1:ReflistsInput'/>
| </schema>
| </wsdl:types>
|
Where I originally had the mapping to the wsdl element name, I had to change it to point to the underlying schema-defined XML type.
Is this the expected behavior - a change from the earlier JBossWS implementation? Or is there a way to point to the wsdl names by namespace resolution?
dlgrasse
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071254#4071254
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071254
18 years, 9 months
[JBossWS] - problems using wsconsume
by pillcase
Dear all,
I'm newbie to the JBoss WS, I want to develop a ws client using a wsdl file, when I tried to use the wsconsume, exceptions occured.
This is the wsdl file:
<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:xsd="http://loginservice.poc.com/types" xmlns:ns="http://loginservice.poc.com" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://loginservice.poc.com"><wsdl:documentation>LoginService</wsdl:documentation><wsdl:types><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://loginservice.poc.com/types">
<xs:element name="checking">
<xs:complexType>
<xs:sequence>
<xs:element name="userName" nillable="true" type="xs:string" />
<xs:element name="password" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="checkingResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema></wsdl:types><wsdl:message name="checkingMessage"><wsdl:part name="part1" element="xsd:checking" /></wsdl:message><wsdl:message name="checkingResponseMessage"><wsdl:part name="part1" element="xsd:checkingResponse" /></wsdl:message><wsdl:portType name="LoginServicePortType"><wsdl:operation name="checking"><wsdl:input message="ns:checkingMessage" wsaw:Action="urn:checking" /><wsdl:output message="ns:checkingResponseMessage" wsaw:Action="urn:checking" /></wsdl:operation></wsdl:portType><wsdl:binding name="LoginServiceSOAP11Binding" type="ns:LoginServicePortType"><soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /><wsdl:operation name="checking"><soap:operation soapAction="urn:checking" style="document" /><wsdl:input><soap:body use="literal" /></wsdl:input><wsdl:output><soap:body use="literal" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:binding name="LoginServiceSOAP12Binding" type="ns:LoginServicePortType"><soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /><wsdl:operation name="checking"><soap12:operation soapAction="urn:checking" style="document" /><wsdl:input><soap12:body use="literal" /></wsdl:input><wsdl:output><soap12:body use="literal" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:binding name="LoginServiceHttpBinding" type="ns:LoginServicePortType"><http:binding verb="POST" /><wsdl:operation name="checking"><http:operation location="checking" /><wsdl:input><mime:content type="text/xml" /></wsdl:input><wsdl:output><mime:content type="text/xml" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="LoginService"><wsdl:port name="LoginServiceSOAP11port_http" binding="ns:LoginServiceSOAP11Binding"><soap:address location="http://192.168.1.153:8080/axis2/services/LoginService" /></wsdl:port><wsdl:port name="LoginServiceSOAP12port_http" binding="ns:LoginServiceSOAP12Binding"><soap12:address location="http://192.168.1.153:8080/axis2/services/LoginService" /></wsdl:port><wsdl:port name="LoginServiceHttpport" binding="ns:LoginServiceHttpBinding"><http:address location="http://192.168.1.153:8080/axis2/services/LoginService" /></wsdl:port></wsdl:service></wsdl:definitions>
This is the exceptions:
Failed to invoke WsImport
javax.xml.stream.FactoryConfigurationError: Provider com.ctc.wstx.stax.WstxInput
Factory not found
at javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:72)
at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:120)
at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:92)
at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:136
)
at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory.(XMLStrea
mReaderFactory.java:36)
at com.sun.xml.ws.api.addressing.WSEndpointReference.(WSEndpointRe
ference.java:130)
at com.sun.xml.ws.api.addressing.AddressingVersion.(AddressingVers
ion.java:422)
at com.sun.xml.ws.api.addressing.AddressingVersion.(AddressingVers
ion.java:53)
at com.sun.xml.ws.api.addressing.AddressingVersion$1.(AddressingVe
rsion.java:132)
at com.sun.xml.ws.api.addressing.AddressingVersion.(AddressingVe
rsion.java:55)
at com.sun.tools.ws.wsdl.parser.MemberSubmissionAddressingExtensionHandl
er.getNamespaceURI(MemberSubmissionAddressingExtensionHandler.java:52)
at com.sun.tools.ws.wsdl.parser.WSDLParser.register(WSDLParser.java:116)
at com.sun.tools.ws.wsdl.parser.WSDLParser.(WSDLParser.java:106)
at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLMo
deler.java:95)
at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:148)
at org.jboss.ws.tools.jaxws.impl.SunRIConsumerImpl.consume(SunRIConsumer
Impl.java:187)
at org.jboss.wsf.spi.tools.cmd.WSConsume.importServices(WSConsume.java:2
16)
at org.jboss.wsf.spi.tools.cmd.WSConsume.main(WSConsume.java:79)
Does anyone knows how to solve this problem?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071102#4071102
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071102
18 years, 9 months
[JBossWS] - Failed to create a new SAX parser
by Ufic
Hi.
I created a simple webservice with a string param and a string return value.
I'm able to deploy it and to use it through a standalone application (a simple main function).
But, if I use THE SAME code in a servlet, I receive this error:
[ServiceFactoryImpl] Use jaxrpc-mapping from: jar:file:/opt/jboss-4.2.0.CR1/server/default/tmp/deploy/tmp28550DipScienzeInformazioneApp.ear-contents/DipartimentoEJB.jar!/META-INF/jaxrpc-mapping.xml
| 10:41:15,481 INFO [STDOUT] 10:41:15,478 ERROR [[Search]] Servlet.service() for servlet Search threw exception
| org.jboss.xb.binding.JBossXBRuntimeException: Failed to create a new SAX parser
| at org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(UnmarshallerFactory.java:100)
| at org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMappingFactory.parse(JavaWsdlMappingFactory.java:79)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:77)
| at org.jboss.ws.core.jaxrpc.client.ServiceImpl.<init>(ServiceImpl.java:111)
| at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
| at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:128)
| at it.agaticarnazzo.ateneo.lib.WsLib.retrieveWebService(WsLib.java:118)
| at it.agaticarnazzo.ateneo.lib.WsLib.findDocumenti(WsLib.java:99)
| at it.agaticarnazzo.ateneo.lib.WsLib.findDocumenti(WsLib.java:81)
| at it.agaticarnazzo.ateneo.lib.WsLib.findDocumenti(WsLib.java:56)
| at it.agaticarnazzo.ateneo.web.SearchServlet.doPost(SearchServlet.java:34)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:624)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: org.jboss.xb.binding.JBossXBException: Failed to create a new SAX parser
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.<init>(SaxJBossXBParser.java:96)
| at org.jboss.xb.binding.UnmarshallerImpl.<init>(UnmarshallerImpl.java:55)
| at org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(UnmarshallerFactory.java:96)
| ... 30 more
| Caused by: java.lang.ClassCastException: org.apache.xerces.parsers.XIncludeAwareParserConfiguration
| at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
| at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
| at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.<init>(Unknown Source)
| at org.apache.xerces.jaxp.SAXParserImpl.<init>(Unknown Source)
| at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source)
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.<init>(SaxJBossXBParser.java:92)
| ... 32 more
This is my code:
QName qname = new QName("http://dipartimento.ws.agaticarnazzo.it/",
| "CatalogoService");
|
| ServiceFactory factory = ServiceFactory.newInstance();
| Service service = factory.createService(endpoint, qname); // This line throws the exception
|
| CatalogoService ret = (CatalogoService)
| service.getPort(CatalogoService.class);
| return ret;
|
I'm using JBoss 4.2.0CR1, JDK 1.5 and xerces lib from jboss lib/endorsed folder.
Can someone help me?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070849#4070849
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070849
18 years, 9 months
[JBossWS] - Deploying WebServices JBoss 4.0.5 + JDK 1.5
by goodvin
I have been trying to make a simple web service work for a while with different errors. I follow examples I found on the web. Can someone tell me what am I doing wrong?
I use JBoss 4.0.5 with JDK 1.5 as it's the latest officially supported version by JBoss.
My test client returns:
[Fatal Error] :-1:-1: Premature end of file.
Receiving: null
And the error I get in the JBoss console executing my test web service is:
ERROR -> [[HelloBean]] Servlet.service() for servlet HelloBean threw exception
java.lang.AbstractMethodError: org.jboss.ws.soap.SOAPMessageImpl.setProperty(Ljava/lang/String;Ljava/lang/Object;)V
at org.jboss.ws.soap.SOAPMessageImpl.(SOAPMessageImpl.java:65)
at org.jboss.ws.soap.MessageFactoryImpl.createMessageInternal(MessageFactoryImpl.java:209)
at org.jboss.ws.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:142)
at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:190)
at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
................................................................
The files below is what I use for testing.
Hello.java:
package test;
import java.rmi.Remote;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
@WebService
@SOAPBinding(style=Style.RPC)
public interface Hello extends Remote {
String sayHello(String name);
}
HelloBean.java:
package test;
import javax.ejb.Remote;
import javax.ejb.Stateless;
import javax.jws.WebService;
@Stateless
@WebService(endpointInterface = "test.Hello")
@Remote(Hello.class)
public class HelloBean implements Hello {
public String sayHello(String name) {
return "Hello " + name;
}
}
And my test client HelloClient:
package test;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.rpc.Service;
import javax.xml.rpc.ServiceFactory;
public class HelloClient {
public static void main(String[] args) throws Exception {
System.out.println("Starting Test Client");
URL url = new URL("http://rad-mobile1:8080/test/HelloBean?wsdl");
QName qname = new QName("http://test/jaws", "HelloService");
System.out.println("Creating a service Using: \n\t" + url + " \n\tand " + qname);
ServiceFactory factory = ServiceFactory.newInstance();
Service remote = factory.createService(url, qname);
System.out.println("Obtaining reference to a proxy object");
Hello proxy = (Hello) remote.getPort(Hello.class);
System.out.println("Accessed local proxy: " + proxy);
String name = "John";
System.out.println("Sending: name=" + name);
System.out.println("Receiving: " + proxy.sayHello("John"));
}
}
Any help is greatly appreciated!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070817#4070817
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070817
18 years, 9 months
[JBossWS] - Re: BASIC Authentication with jbossws-2.0.0.GA
by fheldt
Here are the relevant lines from the log (i enabled trace for org.jboss.security.auth.spi):
| 2007-08-03 15:08:18,623 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] initialize, instance=@19070485
| 2007-08-03 15:08:18,624 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] Security domain: dhcRealm
| 2007-08-03 15:08:18,624 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] DatabaseServerLoginModule, dsJndiName=java:/DHCDS
| 2007-08-03 15:08:18,624 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] principalsQuery=SELECT user_pass FROM Users WHERE UserID=? AND Expires>=CURRENT_DATE
| 2007-08-03 15:08:18,624 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] rolesQuery=SELECT Role,'' AS RoleGroup FROM Roles R,Users U,Users_Roles_Link UR WHERE U.UserID=? AND U.Id=UR.UserID AND R.Id=UR.RoleId
| 2007-08-03 15:08:18,624 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] suspendResume=true
| 2007-08-03 15:08:18,624 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] login
| 2007-08-03 15:08:18,624 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] Authenticating as unauthenticatedIdentity=null
| 2007-08-03 15:08:18,624 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] suspendAnyTransaction
| 2007-08-03 15:08:18,625 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] Excuting query: SELECT user_pass FROM Users WHERE UserID=? AND Expires>=CURRENT_DATE, with username: null
| 2007-08-03 15:08:18,626 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] Query returned no matches from db
| 2007-08-03 15:08:18,626 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] resumeAnyTransaction
| 2007-08-03 15:08:18,626 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] abort
| 2007-08-03 15:08:18,626 ERROR [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] SOAP request exception
| javax.ejb.EJBAccessException: Authentication failure
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.handleGeneralSecurityException(Ejb3AuthenticationInterceptor.java:68)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:70)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.wsf.container.jboss42.InvocationHandlerEJB3.invoke(InvocationHandlerEJB3.java:98)
| at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:206)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:396)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:260)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:177)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:110)
| at org.jboss.wsf.spi.invocation.EndpointServlet.service(EndpointServlet.java:72)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:595)
| 2007-08-03 15:08:18,628 ERROR [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] SOAP request exception
| javax.ejb.EJBAccessException: Authentication failure
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.handleGeneralSecurityException(Ejb3AuthenticationInterceptor.java:68)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:70)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.wsf.container.jboss42.InvocationHandlerEJB3.invoke(InvocationHandlerEJB3.java:98)
| at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:206)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:396)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:260)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:177)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:110)
| at org.jboss.wsf.spi.invocation.EndpointServlet.service(EndpointServlet.java:72)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:595)
|
Here's the code:
| package com.hcuc.ejb;
|
| import javax.ejb.Remote;
|
| @Remote
| public interface EchoIf
| {
| public String echo(String name);
| }
|
| package com.hcuc.ejb;
|
| import javax.annotation.security.RolesAllowed;
| import javax.ejb.Stateless;
| import javax.jws.WebMethod;
| import javax.jws.WebParam;
| import javax.jws.WebService;
| import javax.jws.soap.SOAPBinding;
|
| import org.jboss.annotation.security.SecurityDomain;
| import org.jboss.logging.Logger;
| import org.jboss.ws.annotation.WebContext;
|
|
| @Stateless
| @WebService
| //@WebService(name="HCUCService",serviceName="HCUCWebService")
| @SOAPBinding(
| style=SOAPBinding.Style.RPC,
| use=SOAPBinding.Use.LITERAL
| )
| @SecurityDomain("dhcRealm")
| @RolesAllowed({"Admin"})
| @WebContext(authMethod="BASIC", transportGuarantee="NONE", secureWSDLAccess=false)
| public class EchoEJB implements EchoIf
| {
| private static Logger logger = Logger.getLogger(EchoEJB.class);
|
| @WebMethod
| public String echo(@WebParam(name="name") String name) {
| if (logger.isTraceEnabled())
| logger.trace(String.format("Enter echo('%s')", name));
| return "Hello " + name;
| }
| }
|
Here's the C# client:
| using System;
| using System.Collections.Generic;
| using System.Text;
| using System.Net;
| using TestWSApp.WebReference;
|
| namespace TestWSApp
| {
| class Program
| {
| static void Main(string[] args)
| {
| EchoEJBService ws = new EchoEJBService();
| ws.Credentials = new NetworkCredential("admin", "secret");
| ws.PreAuthenticate = true;
| try
| {
| Console.WriteLine(ws.echo("Frank"));
| }
| catch (Exception ex)
| {
| Console.WriteLine(ex.ToString());
| }
| Console.Write("\n\nPress any key: ");
| Console.ReadKey();
| }
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070586#4070586
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070586
18 years, 9 months
[JBossWS] - WS import failed.
by Amold
Hi,
I am new to webservices and unable to debug the following exception
ServerUtilityPlatform\workspace\Build\buildWebService.xml:61: wsimport failed
at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:539)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:384)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:64)
at net.sf.antcontrib.logic.ForEach.executeSequential(ForEach.java:178)
at net.sf.antcontrib.logic.ForEach.execute(ForEach.java:254)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Please guide. Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070381#4070381
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070381
18 years, 9 months
[JBossWS] - JBoss 4.0.x migration to 4.2.x
by dlgrasse
I have been asked to move an existing web service application from the current JBoss 4.0.3SP1 AS to 4.2.1. My reading from the Wikis and FAQs lead me to believe that as long as certain specifics weren't being used, that the migration to JBossWS would be seamless (http://wiki.jboss.org/wiki/Wiki.jsp?page=JBWS404Compatibility). We had a few org.jboss.axis dependencies in our code (accessing the username/password from the rg.jboss.axis.MessageContext, etc), but I was able to use the JBossWS-1.2.1 jars and recompile fine after making a couple of changes to the code. So far, so good.
I haven't been able to deploy though. I'm getting an error that seems to a jaxrpc-mapping issue. Specifically I'm seeing "The content of '{an xsd type}' is invalid. Element 'extension' is invalid, misplaced, or occurs too often.". The wsdl, webservice.xml, and jaxrpc-mapping files haved worked for years, and, except for a wsdl-port namespace issue in the webservice.xml file, haven't been changed.
My own searches in this forum and Wiki and FAQ pages haven't turned up anything useful about this error.
Could this be an issue exposed due to an XML parser change? Looking at the Xerces impl versions between the two AS', there is a minor version change.
Or is there something fundamentally different that I'm not taking into account, and the specific error is a red herring? I was hoping to take the link above at its word and avoid any major changes (i.e. using annotations).
I appreciate any pointers anyone could give. If it would be useful to see the jaxrpc-mapping, wsdl, or backing xsd types, I can certainly post relevant parts of the files here.
dlgrasse
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070200#4070200
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070200
18 years, 9 months
[JBossWS] - Deployment exception with JbossWs 2.0.0 - Cannot find servic
by matt_law
I am deploying a set of EJB3 classes to JBoss 4.0.5 which has EJB3 rc9 & JBossWS 2.0.0 installed. Previously the ejbs have been deployed to jboss 4.0.4 with ejb3 rc9 & jbossws 1.2 with no errors. Now when I start jboss I get the following error
| 11:21:49,965 ERROR [MainDeployer] Could not start deployment: file:/C:/Development/jboss/jboss-4.0.5.GA.TMP/server/default/deploy/GermanPatientHistoryEJB.jar
| javax.xml.ws.WebServiceException: Cannot find service endpoint target: jboss.j2ee:name=AddressServiceBean,service=EJB3,jar=GermanPatientHistoryEJB.jar
| at org.jboss.wsf.container.jboss40.InvocationHandlerEJB3.start(InvocationHandlerEJB3.java:70)
| at org.jboss.wsf.spi.deployment.BasicLifecycleHandler.start(BasicLifecycleHandler.java:57)
| at org.jboss.wsf.stack.jbws.LifecycleHandlerImpl.start(LifecycleHandlerImpl.java:40)
| at org.jboss.wsf.spi.deployment.EndpointLifecycleDeployer.start(EndpointLifecycleDeployer.java:49)
| at org.jboss.wsf.spi.deployment.BasicDeployerManager.deploy(BasicDeployerManager.java:81)
| at org.jboss.wsf.container.jboss42.MainDeployerHook.deploy(MainDeployerHook.java:46)
| at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:90)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy31.start(Unknown Source)
|
This is despite the fact that I can see the WSDL has been deployed and the endpoint registered -
| 11:21:49,903 INFO [BasicEndpointRegistry] register: jboss.ws:context=GermanPatientHistoryEJB,endpoint=AddressServiceBean
|
I can even view the WSDL through the browser once JBoss completes startup. However, any attempt to invoke them fails.
I have not changed any annotations in the beans as it all looks to be the same as per the User Guide. I do not understand where the deployer is looking for the endpoint, or what might cause this problem. Any help, suggestions would be great.
Matt.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070039#4070039
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070039
18 years, 9 months
[JBossWS] - Re: wstools error in wsdl2java
by matt_law
I have got this problem as well. From what I can find out it is caused by the types, possibly the request and response in John's wsdl. My wsdl is from a 3rd party application so I can't change it much, but I would like to know what I can do to fix it.
I have included the WSDL & XSD docs below
WSDL
| <definitions targetNamespace="http://www.imagenow.com/access/services1.0.wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:impl="http://www.imagenow.com/access/services1.0.wsdl" xmlns:common="http://www.imagenow.com/types/services1.0.xsd" xmlns:access="http://www.imagenow.com/access/services1.0.xsd" xmlns="http://schemas.xmlsoap.org/wsdl/">
| <types>
| <xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified">
| <xs:import namespace="http://www.imagenow.com/access/services1.0.xsd" schemaLocation="imagenow_access.xsd"/>
| </xs:schema>
| </types>
| <message name="INOW_EXCEPTION">
| <part name="INOW_EXCEPTION" element="common:INOW_EXCEPTION"/>
| </message>
| <message name="ACCESS_SESSION_BEGIN_USING_PW_REQUEST">
| <part name="parameter" element="access:ACCESS_SESSION_BEGIN_USING_PASSWORD"/>
| </message>
| <message name="ACCESS_SESSION_BEGIN_USING_PW_RESPONSE">
| <part name="parameter" element="access:LOGIN_OBJECT"/>
| </message>
| <message name="ACCESS_SESSION_END_REQUEST">
| <part name="parameter" element="access:LOGIN_OBJECT"/>
| </message>
| <message name="ACCESS_SESSION_END_RESPONSE">
| <part name="isEnded" element="common:INOW_BOOLEAN"/>
| </message>
| <message name="ACCESS_USER_CHECK_REQUEST">
| <part name="parameter" element="access:ACCESS_USER_CHECK"/>
| </message>
| <message name="ACCESS_USER_CHECK_RESPONSE">
| <part name="isUser" element="common:INOW_BOOLEAN"/>
| </message>
| <portType name="INOW_ACCESS_PORT_TYPE">
| <operation name="ACCESS_SESSION_BEGIN_USING_PASSWORD">
| <documentation>This operation is used to logon to ImageNow via the Message Agent. A logon object is returned and this data is used to set the context for the session that is used for every subsequent client-server communication.</documentation>
| <input message="impl:ACCESS_SESSION_BEGIN_USING_PW_REQUEST"/>
| <output message="impl:ACCESS_SESSION_BEGIN_USING_PW_RESPONSE"/>
| <fault name="inowException" message="impl:INOW_EXCEPTION"/>
| </operation>
| <operation name="ACCESS_SESSION_END">
| <documentation>This operation is used to end a Message Agent session.</documentation>
| <input message="impl:ACCESS_SESSION_END_REQUEST"/>
| <output message="impl:ACCESS_SESSION_END_RESPONSE"/>
| <fault name="inowException" message="impl:INOW_EXCEPTION"/>
| </operation>
| <operation name="ACCESS_USER_CHECK">
| <documentation>This operation is used to see if a particular user name is a valid ImageNow user.</documentation>
| <input message="impl:ACCESS_USER_CHECK_REQUEST"/>
| <output message="impl:ACCESS_USER_CHECK_RESPONSE"/>
| <fault name="inowException" message="impl:INOW_EXCEPTION"/>
| </operation>
| </portType>
| <binding name="INOW_ACCESS_SOAP_HTTP_BIND" type="impl:INOW_ACCESS_PORT_TYPE">
| <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
| <operation name="ACCESS_SESSION_BEGIN_USING_PASSWORD">
| <soap:operation soapAction="urn:#ACCESS_SESSION_BEGIN_USING_PASSWORD"/>
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
| <soap:body use="literal"/>
| </output>
| <fault name="inowException">
| <soap:fault name="inowException" use="literal"/>
| </fault>
| </operation>
| <operation name="ACCESS_SESSION_END">
| <soap:operation soapAction="urn:#ACCESS_SESSION_END"/>
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
| <soap:body use="literal"/>
| </output>
| <fault name="inowException">
| <soap:fault name="inowException" use="literal"/>
| </fault>
| </operation>
| <operation name="ACCESS_USER_CHECK">
| <soap:operation soapAction="urn:#ACCESS_USER_CHECK"/>
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
| <soap:body use="literal"/>
| </output>
| <fault name="inowException">
| <soap:fault name="inowException" use="literal"/>
| </fault>
| </operation>
| </binding>
|
| <documentation>
| General Information
| Perceptive Software's ImageNow(TM) product provides document imaging and management functionality including a document-centric workflow implementation. Perceptive Software's Message Agent exposes a subset of this functionality as web services.
| This WSDL defines the basic access (authentication/authorization) web services available for use in Message Agent client programs.
| </documentation>
| </definitions>
|
XSD 1
| <xs:schema targetNamespace="http://www.imagenow.com/access/services1.0.xsd" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:common="http://www.imagenow.com/types/services1.0.xsd" xmlns:impl="http://www.imagenow.com/access/services1.0.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema">
| <xs:import namespace="http://www.imagenow.com/types/services1.0.xsd" schemaLocation="imagenow_commonTypes.xsd"/>
| <xs:annotation>
| <xs:documentation>Schema defines the access data types needed to access ImageNow via the Message Agent.</xs:documentation>
| </xs:annotation>
| <xs:annotation>
| <xs:documentation>Begin document-literal-wrapped style types definition. Element names exactly match operation names in the corresponding WSDL and the element's complex type has no attributes.</xs:documentation>
| </xs:annotation>
| <xs:element name="ACCESS_SESSION_BEGIN_USING_PASSWORD">
| <xs:annotation>
| <xs:documentation>Defines parameters to begin a Message Agent client session using a user account in ImageNow.</xs:documentation>
| </xs:annotation>
| <xs:complexType>
| <xs:sequence>
| <xs:element ref="common:LOCALE"/>
| <xs:element ref="common:INOW_USER_NAME"/>
| <xs:element name="PASSWORD" type="xs:string">
| <xs:annotation>
| <xs:documentation>ImageNow password for the user.</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element ref="common:APP_CONTEXT"/>
| <xs:element ref="common:MESSAGE_AGENT_SERVER_NAME"/>
| <xs:element ref="impl:MESSAGE_AGENT_SERVER_PORT"/>
| </xs:sequence>
| </xs:complexType>
| </xs:element>
| <xs:element name="ACCESS_SESSION_END">
| <xs:annotation>
| <xs:documentation>Defines parameters to end a Message Agent session.</xs:documentation>
| </xs:annotation>
| <xs:complexType>
| <xs:sequence>
| <xs:element ref="common:INOW_CONTEXT"/>
| </xs:sequence>
| </xs:complexType>
| </xs:element>
| <xs:element name="ACCESS_USER_CHECK">
| <xs:annotation>
| <xs:documentation>Defines parameters to check if a particular user name is a valid ImageNow user.</xs:documentation>
| </xs:annotation>
| <xs:complexType>
| <xs:sequence>
| <xs:element ref="common:INOW_CONTEXT"/>
| <xs:element name="USER_NAME" type="common:USER_NAME_TYPE">
| <xs:annotation>
| <xs:documentation>User name.</xs:documentation>
| </xs:annotation>
| </xs:element>
| </xs:sequence>
| </xs:complexType>
| </xs:element>
| <xs:annotation>
| <xs:documentation>Begin supporting data types.</xs:documentation>
| </xs:annotation>
| <xs:element name="LOGIN_OBJECT">
| <xs:annotation>
| <xs:documentation>Contains authentication parameters for Message Agent.</xs:documentation>
| </xs:annotation>
| <xs:complexType>
| <xs:sequence>
| <xs:element ref="common:INOW_CONTEXT"/>
| <xs:element ref="common:INOW_USER_NAME"/>
| <xs:element name="EXPIRATION_DATE" type="common:INOW_DATE_TIME" nillable="true">
| <xs:annotation>
| <xs:documentation>Expiration for the logon object.</xs:documentation>
| </xs:annotation>
| </xs:element>
| </xs:sequence>
| </xs:complexType>
| </xs:element>
| <xs:element name="MESSAGE_AGENT_SERVER_PORT" type="xs:int">
| <xs:annotation>
| <xs:documentation>Port number for the Message Agent server. Default port numbers are 6070/6075 for HTTP/HTTPS.</xs:documentation>
| </xs:annotation>
| </xs:element>
| </xs:schema>
|
XSD 2
| <xs:schema targetNamespace="http://www.imagenow.com/types/services1.0.xsd" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:impl="http://www.imagenow.com/types/services1.0.xsd" xmlns:ref="http://schemas.xmlsoap.org/ws/2002/04/reference/" xmlns:content="http://schemas.xmlsoap.org/ws/2002/04/content-type/">
| <xs:annotation>
| <xs:documentation>Schema defines data types common to more than one ImageNow service as exposed by Message Agent.</xs:documentation>
| </xs:annotation>
| <xs:element name="INOW_EXCEPTION" nillable="true">
| <xs:annotation>
| <xs:documentation>Common Message Agent exception object related to ImageNow web services.</xs:documentation>
| </xs:annotation>
| <xs:complexType>
| <xs:sequence>
| <xs:element name="ID" type="xs:int">
| <xs:annotation>
| <xs:documentation>ID of the exception.</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element name="ERROR_CODE" type="xs:int">
| <xs:annotation>
| <xs:documentation>Unique error code for the exception.</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element name="ERROR_MESSAGE">
| <xs:annotation>
| <xs:documentation>Error message associated with the error code.</xs:documentation>
| </xs:annotation>
| <xs:simpleType>
| <xs:restriction base="xs:string">
| <xs:maxLength value="1023"/>
| </xs:restriction>
| </xs:simpleType>
| </xs:element>
| </xs:sequence>
| </xs:complexType>
| </xs:element>
| <xs:element name="INOW_CONTEXT">
| <xs:annotation>
| <xs:documentation>Represents the user's context that is passed back and forth between the Message Agent client and server for purposes of utilizing ImageNow functionality via web services.</xs:documentation>
| </xs:annotation>
| <xs:complexType>
| <xs:sequence>
| <xs:element ref="impl:LOCALE"/>
| <xs:element ref="impl:APP_CONTEXT"/>
| <xs:element ref="impl:SESSION_STRING"/>
| <xs:element ref="impl:MESSAGE_AGENT_SERVER_NAME"/>
| <xs:element ref="impl:INOW_USER_NAME"/>
| <xs:element name="AUDIT_USER" type="impl:USER_NAME_TYPE" minOccurs="0">
| <xs:annotation>
| <xs:documentation>Username, as defined in ImageNow, of the user coming through the bridge. Security permissions and auditing will be conducted on this username.</xs:documentation>
| </xs:annotation>
| </xs:element>
| </xs:sequence>
| </xs:complexType>
| </xs:element>
| <xs:element name="INOW_USER_NAME" type="impl:USER_NAME_TYPE">
| <xs:annotation>
| <xs:documentation>Name of the user in ImageNow.</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:simpleType name="USER_NAME_TYPE">
| <xs:annotation>
| <xs:documentation>Name of the user in ImageNow.</xs:documentation>
| </xs:annotation>
| <xs:restriction base="xs:token">
| <xs:maxLength value="31" fixed="true"/>
| </xs:restriction>
| </xs:simpleType>
| <xs:simpleType name="DRAWER_NAME_TYPE">
| <xs:annotation>
| <xs:documentation>Name of a Drawer in ImageNow.</xs:documentation>
| </xs:annotation>
| <xs:restriction base="xs:token">
| <xs:maxLength value="15" fixed="true"/>
| </xs:restriction>
| </xs:simpleType>
| <xs:element name="DRAWER_NAME" type="impl:DRAWER_NAME_TYPE">
| <xs:annotation>
| <xs:documentation>Name of a Drawer in ImageNow.</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element name="DOCUMENT_KEYS" nillable="true">
| <xs:annotation>
| <xs:documentation>Document keys used to uniquely index documents in ImageNow.</xs:documentation>
| </xs:annotation>
| <xs:complexType>
| <xs:annotation>
| <xs:documentation>Document keys used to uniquely index documents in ImageNow.</xs:documentation>
| </xs:annotation>
| <xs:sequence>
| <xs:element ref="impl:DRAWER_NAME" minOccurs="0"/>
| <xs:element name="FOLDER" type="impl:DOC_KEY_FIELD_LENGTH" nillable="true" minOccurs="0">
| <xs:annotation>
| <xs:documentation>Logical representation of a folder inside a drawer.</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element name="TAB" type="impl:DOC_KEY_FIELD_LENGTH" nillable="true" minOccurs="0">
| <xs:annotation>
| <xs:documentation>Logical representation of a tab inside a folder.</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element name="FIELD3" type="impl:DOC_KEY_FIELD_LENGTH" nillable="true" minOccurs="0">
| <xs:annotation>
| <xs:documentation>Additional field to further uniquely qualify a document.</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element name="FIELD4" type="impl:DOC_KEY_FIELD_LENGTH" nillable="true" minOccurs="0">
| <xs:annotation>
| <xs:documentation>Additional field to furhter uniquely qualify a document.</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element name="FIELD5" type="impl:DOC_KEY_FIELD_LENGTH" nillable="true" minOccurs="0">
| <xs:annotation>
| <xs:documentation>Additional field to further uniquely qualify a document.</xs:documentation>
| </xs:annotation>
| </xs:element>
| </xs:sequence>
| </xs:complexType>
| </xs:element>
| <xs:simpleType name="DOC_KEY_FIELD_LENGTH">
| <xs:annotation>
| <xs:documentation>Limits the length of a document key to 39 characters.</xs:documentation>
| </xs:annotation>
| <xs:restriction base="xs:token">
| <xs:maxLength value="39" fixed="true"/>
| </xs:restriction>
| </xs:simpleType>
| <xs:element name="DOCUMENT_ID" type="impl:UNIQUE_ID_TYPE" nillable="true">
| <xs:annotation>
| <xs:documentation>Unique identifier for a document in ImageNow. </xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:simpleType name="UNIQUE_ID_TYPE">
| <xs:annotation>
| <xs:documentation>Common type for unique ID fields.</xs:documentation>
| </xs:annotation>
| <xs:restriction base="xs:token">
| <xs:maxLength value="23" fixed="true"/>
| </xs:restriction>
| </xs:simpleType>
| <xs:element name="DOCUMENT_KEYWORDS" nillable="true">
| <xs:annotation>
| <xs:documentation>Holds key word values for a particular document in ImageNow.</xs:documentation>
| </xs:annotation>
| <xs:simpleType>
| <xs:restriction base="xs:string">
| <xs:maxLength value="1023"/>
| </xs:restriction>
| </xs:simpleType>
| </xs:element>
| <xs:element name="DOCUMENT_OBJECT">
| <xs:annotation>
| <xs:documentation>Logical represenation of the data comprising an ImageNow document.</xs:documentation>
| </xs:annotation>
| <xs:complexType>
| <xs:sequence>
| <xs:element ref="impl:DOCUMENT_KEYS" minOccurs="0"/>
| <xs:element name="TOTAL_PAGES" type="xs:int" nillable="true" minOccurs="0">
| <xs:annotation>
| <xs:documentation>Total number of pages in the document.</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element ref="impl:DOCUMENT_ID" minOccurs="0"/>
| <xs:element name="SCAN_USERID" type="impl:UNIQUE_ID_TYPE" nillable="true" minOccurs="0">
| <xs:annotation>
| <xs:documentation>ID of the scan user.</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element name="SCAN_USER_NAME" type="impl:USER_NAME_TYPE" nillable="true" minOccurs="0">
| <xs:annotation>
| <xs:documentation>Name of the scan user.</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element ref="impl:SCAN_TIME" minOccurs="0"/>
| <xs:element name="MODIFICATION_USERID" type="impl:UNIQUE_ID_TYPE" nillable="true" minOccurs="0">
| <xs:annotation>
| <xs:documentation>UserID for user making last modification to the document.</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element name="MOD_USER_NAME" type="impl:USER_NAME_TYPE" minOccurs="0">
| <xs:annotation>
| <xs:documentation>Name of last user to modify the document.</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element ref="impl:MODIFICATION_TIME" minOccurs="0"/>
| <xs:element name="LAST_VIEWED_USERID" type="impl:UNIQUE_ID_TYPE" nillable="true" minOccurs="0">
| <xs:annotation>
| <xs:documentation>ID of the last user to view a document.</xs:documentation>
| <xs:documentation>ID of the last user to view a document.</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element name="LAST_VIEWED_USER_NAME" type="impl:USER_NAME_TYPE" nillable="true" minOccurs="0">
| <xs:annotation>
| <xs:documentation>User name of the last person to view a document.</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element name="LAST_VIEWED_TIME" type="impl:INOW_DATE_TIME" nillable="true" minOccurs="0">
| <xs:annotation>
| <xs:documentation>Time the document was last viewed.</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element name="FREE_FIELD" minOccurs="0">
| <xs:annotation>
| <xs:documentation>Free field. Can be used for keywords.</xs:documentation>
| </xs:annotation>
| <xs:simpleType>
| <xs:restriction base="xs:token">
| <xs:maxLength value="1023"/>
| </xs:restriction>
| </xs:simpleType>
| </xs:element>
| <xs:element name="CURRENT_QID" nillable="true" minOccurs="0">
| <xs:annotation>
| <xs:documentation>ID of the current workflow queue.</xs:documentation>
| </xs:annotation>
| <xs:simpleType>
| <xs:restriction base="xs:token">
| <xs:maxLength value="23"/>
| </xs:restriction>
| </xs:simpleType>
| </xs:element>
| <xs:element ref="impl:WORKFLOW_Q_NAME" minOccurs="0"/>
| <xs:element ref="impl:WORKFLOW_STATUS" minOccurs="0">
| <xs:annotation>
| <xs:documentation>Describes state of the document in relation to workflow such as "idle."</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element ref="impl:WORKFLOW_QITEM_ID" minOccurs="0"/>
| <xs:element name="Q_USER_ID" type="impl:UNIQUE_ID_TYPE" nillable="true" minOccurs="0">
| <xs:annotation>
| <xs:documentation>ID of user working with document in workflow. </xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element name="Q_USER_NAME" type="impl:USER_NAME_TYPE" minOccurs="0">
| <xs:annotation>
| <xs:documentation>Name of the workflow user name.</xs:documentation>
| </xs:annotation>
| </xs:element>
| </xs:sequence>
| </xs:complexType>
| </xs:element>
| <xs:element name="DOC_MODE" type="impl:DOC_MODE_TYPE" nillable="true">
| <xs:annotation>
| <xs:documentation>Selector to identify whether to use DOC_KEYS (KEYS) or DOC_ID (DOCID).</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:simpleType name="DOC_MODE_TYPE">
| <xs:annotation>
| <xs:documentation>Selector to identify whether to use KEYS or DOCID when working with documents.</xs:documentation>
| </xs:annotation>
| <xs:restriction base="xs:token">
| <xs:enumeration value="KEYS"/>
| <xs:enumeration value="DOCID"/>
| </xs:restriction>
| </xs:simpleType>
| <xs:element name="WORKFLOW_Q_NAME" type="impl:WORKFLOW_Q_NAME_TYPE" nillable="true">
| <xs:annotation>
| <xs:documentation>Name of an ImageNow workflow queue.</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:simpleType name="WORKFLOW_Q_NAME_TYPE">
| <xs:annotation>
| <xs:documentation>Name of an ImageNow workflow queue.</xs:documentation>
| </xs:annotation>
| <xs:restriction base="xs:string">
| <xs:maxLength value="127" fixed="true"/>
| </xs:restriction>
| </xs:simpleType>
| <xs:element name="WORKFLOW_QITEM_ID" type="impl:UNIQUE_ID_TYPE" nillable="true">
| <xs:annotation>
| <xs:documentation>Unique ID for a document in workflow.</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element name="WORKFLOW_STATUS">
| <xs:annotation>
| <xs:documentation>Defines the state of a workflow item. Possible settings are: IDLE, WORKING, HOLDING, PENDING, FINISHED, COMPLETED, and ANY.</xs:documentation>
| </xs:annotation>
| <xs:simpleType>
| <xs:restriction base="xs:string">
| <xs:maxLength value="39"/>
| <xs:enumeration value="IDLE"/>
| <xs:enumeration value="WORKING"/>
| <xs:enumeration value="HOLDING"/>
| <xs:enumeration value="PENDING"/>
| <xs:enumeration value="FINISHED"/>
| <xs:enumeration value="COMPLETED"/>
| <xs:enumeration value="ANY"/>
| </xs:restriction>
| </xs:simpleType>
| </xs:element>
| <xs:element name="SCAN_TIME" type="impl:INOW_DATE_TIME" nillable="true">
| <xs:annotation>
| <xs:documentation>Date and time scan occurred.</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element name="MODIFICATION_TIME" type="impl:INOW_DATE_TIME" nillable="true">
| <xs:annotation>
| <xs:documentation>Time the document was last modified.</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element name="MESSAGE_AGENT_SERVER_NAME" type="xs:token" nillable="true">
| <xs:annotation>
| <xs:documentation>Hostname of the Message Agent server.</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element name="APP_CONTEXT" type="xs:token" nillable="true">
| <xs:annotation>
| <xs:documentation>An application specific context used primarily to identify that a "client" is acting as a bridge for other users and to identify whether the AUDIT_USER field should be evaluated.</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element name="LOCALE" type="xs:token" nillable="true">
| <xs:annotation>
| <xs:documentation>Placeholder for internationalization or browser location value.</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element name="SESSION_STRING" type="xs:token" nillable="true">
| <xs:annotation>
| <xs:documentation>A session string representing the user's context</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element name="INOW_BOOLEAN" type="xs:int">
| <xs:annotation>
| <xs:documentation>Uses an integer to represent success or failure. 0 implies a non-positive result which will likely spawn an exception and a value of 1 represents success. </xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:element name="TIMEOUT" type="xs:int">
| <xs:annotation>
| <xs:documentation>Determines amount of time to wait for a response. Units in seconds.</xs:documentation>
| </xs:annotation>
| </xs:element>
| <xs:simpleType name="INOW_DATE_TIME">
| <xs:annotation>
| <xs:documentation>This time is represented as seconds elapsed since midnight (00:00:00), January 1, 1970, coordinated universal time (UTC). A normative representation is 1093292609:279889 representing the seconds:microseconds since 1JAN70. </xs:documentation>
| </xs:annotation>
| <xs:restriction base="xs:string"/>
| </xs:simpleType>
| </xs:schema>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069997#4069997
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069997
18 years, 9 months
[JBossWS] - SSL & Authorization
by FabBoco
Hi guys,
I really need some directions from you.
I have a test ws:
| @Stateless
| @WebService(name = "wstest", serviceName = "wstest")
| @WebContext(contextRoot = "/ma", transportGuarantee="NONE", secureWSDLAccess = false)
| @Remote(WsTest.class)
| @RemoteBinding
| @SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
| public class WsTestBean implements WsTest
| {
| Logger log = Logger.getLogger(WsTestBean.class);
|
| @WebMethod
| public String echo(String message)
| {
| return message;
| }
| }
|
deployed into Jboss 4.2.0
Using wsconsume I prepared the proxy and my client is able to call the ws:
| public class WsTestClient
| {
|
| public static void main(String[] args)
| {
| System.out.println("WsTest Client Start");
|
|
| Wstest_Service ws = new Wstest_Service();
|
| Wstest wsTest = ws.getWstestPort();
|
| System.out.println("Echo message: "+wsTest.echo("Ciao Ciao sono Fabrizio"));
|
| System.out.println("WsTest Client End");
| }
|
| }
|
What I have to do now (for a real application !) is:
1) use SSL
2) enforce authentication (only authorized user can call the ws)
I have changed the servers as follows:
|
| @WebContext(contextRoot = "/ma", transportGuarantee="CONFIDENTIAL", secureWSDLAccess = false)
|
|
and than the SSL should be ok. The ServiceEndpointAddress switch from http://.....?wsdl to https://.....?wsdl
Then I have tried to regenerate the proxy using wsconsume and I get the following error:
| failed to parse document at "https://fabocoxp2:8443/ma/WsTestBean?wsdl": javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
| at org.jboss.com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:215)
| at org.jboss.com.sun.tools.ws.processor.config.ModelInfo.buildModel(ModelInfo.java:88)
| at org.jboss.com.sun.tools.ws.processor.Processor.runModeler(Processor.java:82)
| at org.jboss.com.sun.tools.ws.wscompile.CompileTool.run(CompileTool.java:543)
| at org.jboss.com.sun.tools.ws.util.ToolBase.run(ToolBase.java:57)
| at org.jboss.ws.tools.jaxws.impl.WSContractConsumerImpl$1.run(WSContractConsumerImpl.java:163)
| at org.jboss.ws.tools.jaxws.impl.WSContractConsumerImpl.consume(WSContractConsumerImpl.java:166)
| at org.jboss.ws.tools.jaxws.command.wsconsume.importServices(wsconsume.java:193)
| at org.jboss.ws.tools.jaxws.command.wsconsume.main(wsconsume.java:76)
| Caused by: failed to parse document at "https://fabocoxp2:8443/ma/WsTestBean?wsdl": javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
| at org.jboss.com.sun.tools.ws.wsdl.parser.WSDLParser.buildDocumentFromWSDL(WSDLParser.java:318)
| at org.jboss.com.sun.tools.ws.wsdl.parser.WSDLParser.parseDefinitions(WSDLParser.java:222)
| at org.jboss.com.sun.tools.ws.wsdl.parser.WSDLParser.parse(WSDLParser.java:213)
| at org.jboss.com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:166)
| ... 8 more
| Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
| at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150)
| at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1518)
| at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:174)
| at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:168)
| at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:848)
| at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:106)
| at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495)
| at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:433)
| at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:818)
| at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1030)
| at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1057)
| at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1041)
| at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:402)
| at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:170)
| at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:938)
| at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
| at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
| at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(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.DOMParser.parse(Unknown Source)
| at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
| at org.jboss.com.sun.tools.ws.wsdl.parser.WSDLParser.buildDocumentFromWSDL(WSDLParser.java:276)
| ... 11 more
| Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
| at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:221)
| at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:145)
| at sun.security.validator.Validator.validate(Validator.java:203)
| at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:172)
| at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(SSLContextImpl.java:320)
| at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:841)
| ... 30 more
| Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
| at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:236)
| at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:194)
| at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:216)
| ... 35 more
| error: failed to parse document at "https://fabocoxp2:8443/ma/WsTestBean?wsdl": javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
|
I think that I have to put a certificate somewhere !
Reading documentation I realized that I have to configure:
boss-wsse-server.xml
and
jboss-wsse-client.xml
but I can't find a step-by-step procedure.
What about authorization ?
Thank you in advance for any help.
Regards
Fabrizio
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069518#4069518
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069518
18 years, 9 months