[JBossWS] - Re: jbossws 1.0.4GA - wstools fail on a webervice
by ste
Using an AXIS2 WSDL I fall in a slight variation the error:
17:29:35,379 WARN [WSDL11Reader] Unprocessed extension element: {http://schemas.xmlsoap.org/wsdl/http/}address
Exception in thread "main" org.jboss.ws.WSException: String passed is null
| at org.jboss.ws.metadata.wsdl.WSDLUtils.firstLetterUpperCase(WSDLUtils.java:455)
| at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:138)
| at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:114)
| at org.jboss.ws.tools.WSDLToJava.generateJavaSource(WSDLToJava.java:658)
| at org.jboss.ws.tools.WSDLToJava.generateJavaSource(WSDLToJava.java:651)
| at org.jboss.ws.tools.WSDLToJava.unwrapResponse(WSDLToJava.java:291)
| at org.jboss.ws.tools.WSDLToJava.getReturnType(WSDLToJava.java:540)
| at org.jboss.ws.tools.WSDLToJava.appendMethods(WSDLToJava.java:342)
| at org.jboss.ws.tools.WSDLToJava.createSEIFile(WSDLToJava.java:486)
| at org.jboss.ws.tools.WSDLToJava.createSEI(WSDLToJava.java:518)
| at org.jboss.ws.tools.WSDLToJava.generateSEI(WSDLToJava.java:161)
| at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(ToolsHelper.java:303)
| 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)
with this WSDL:
anonymous wrote : <wsdl:definitions xmlns:axis2="http://axisversion.sample" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns0="http://axisversion.sample/xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://axisversion.sample">
| <wsdl:documentation>Version</wsdl:documentation>
| - <wsdl:types>
| - <xs:schema xmlns:ns="http://axisversion.sample/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://axisversion.sample/xsd">
| - <xs:element name="getVersionFault">
| - <xs:complexType>
| - <xs:sequence>
| <xs:element name="getVersionFault" type="xs:anyType" />
| </xs:sequence>
| </xs:complexType>
| </xs:element>
| - <xs:element name="getVersionResponse">
| - <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="getVersionMessage" />
| - <wsdl:message name="getVersionResponse">
| <wsdl:part name="part1" element="ns0:getVersionResponse" />
| </wsdl:message>
| - <wsdl:message name="getVersionFault">
| <wsdl:part name="part1" element="ns0:getVersionFault" />
| </wsdl:message>
| - <wsdl:portType name="VersionPortType">
| - <wsdl:operation name="getVersion">
| <wsdl:input xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" message="axis2:getVersionMessage" wsaw:Action="urn:getVersion" />
| <wsdl:output message="axis2:getVersionResponse" />
| <wsdl:fault message="axis2:getVersionFault" name="getVersionFault" />
| </wsdl:operation>
| </wsdl:portType>
| - <wsdl:binding name="VersionSOAP11Binding" type="axis2:VersionPortType">
| <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
| - <wsdl:operation name="getVersion">
| <soap:operation soapAction="urn:getVersion" style="document" />
| - <wsdl:input>
| <soap:body use="literal" />
| </wsdl:input>
| - <wsdl:output>
| <soap:body use="literal" />
| </wsdl:output>
| - <wsdl:fault name="getVersionFault">
| <soap:body use="literal" />
| </wsdl:fault>
| </wsdl:operation>
| </wsdl:binding>
| - <wsdl:binding name="VersionSOAP12Binding" type="axis2:VersionPortType">
| <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
| - <wsdl:operation name="getVersion">
| <soap12:operation soapAction="urn:getVersion" style="document" />
| - <wsdl:input>
| <soap12:body use="literal" />
| </wsdl:input>
| - <wsdl:output>
| <soap12:body use="literal" />
| </wsdl:output>
| - <wsdl:fault name="getVersionFault">
| <soap12:fault use="literal" name="getVersionFault" />
| </wsdl:fault>
| </wsdl:operation>
| </wsdl:binding>
| - <wsdl:binding name="VersionHttpBinding" type="axis2:VersionPortType">
| <http:binding verb="POST" />
| - <wsdl:operation name="getVersion">
| <http:operation location="getVersion" />
| - <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="Version">
| - <wsdl:port name="VersionSOAP11port_http" binding="axis2:VersionSOAP11Binding">
| <soap:address location="http://127.0.0.1:8080/axis2/services/Version" />
| </wsdl:port>
| - <wsdl:port name="VersionSOAP12port_http" binding="axis2:VersionSOAP12Binding">
| <soap12:address location="http://127.0.0.1:8080/axis2/services/Version" />
| </wsdl:port>
| - <wsdl:port name="VersionHttpport1" binding="axis2:VersionHttpBinding">
| <http:address location="http://127.0.0.1:8080/axis2/rest/Version" />
| </wsdl:port>
| </wsdl:service>
| </wsdl:definitions>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987630#3987630
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987630
18 years, 1 month
[JBossWS] - Interfaces in Webmethods
by wconroy
I have an EJB that exposes only interfaces that I want to wrap with a webservice. I made the following to illustrate what I am trying to do. I have an app that invokes the web service that gives me the following exception.
| 07:59:52,873 ERROR [SOAPFaultExceptionHelper] SOAP request exception
| javax.xml.rpc.JAXRPCException: org.jboss.ws.binding.BindingException: org.jboss.ws.jaxb.UnmarshalException: Failed to parse source: Class com.bo.valueobjects.PersonRequest has no public constructors or the class reflects a primitive type or void
| at org.jboss.ws.soap.SOAPContentElement.getObjectValue(SOAPContentElement.java:292)
| at org.jboss.ws.binding.EndpointInvocation.transformPayloadValue(EndpointInvocation.java:233)
| at org.jboss.ws.binding.EndpointInvocation.getRequestParamValue(EndpointInvocation.java:103)
| at org.jboss.ws.binding.EndpointInvocation.getRequestPayload(EndpointInvocation.java:117)
| at org.jboss.ws.integration.jboss.ServiceEndpointInvokerEJB3.invokeServiceEndpoint(ServiceEndpointInvokerEJB3.java:115)
| at org.jboss.ws.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:115)
| at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:219)
| 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)
| 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(Thread.java:595)
| Caused by: org.jboss.ws.binding.BindingException: org.jboss.ws.jaxb.UnmarshalException: Failed to parse source: Class com.bo.valueobjects.PersonRequest hasno public constructors or the class reflects a primitive type or void
| at org.jboss.ws.jaxrpc.encoding.JAXBDeserializer.deserialize(JAXBDeserializer.java:100)
| at org.jboss.ws.soap.SOAPContentElement.getObjectValue(SOAPContentElement.java:229)
| ... 29 more
| Caused by: org.jboss.ws.jaxb.UnmarshalException: Failed to parse source: Class com.bo.valueobjects.PersonRequest has no public constructors or the class reflects a primitive type or void
| at org.jboss.ws.jaxb.JBossXBUnmarshallerImpl.unmarshal(JBossXBUnmarshallerImpl.java:67)
| at org.jboss.ws.jaxrpc.encoding.JAXBDeserializer.deserialize(JAXBDeserializer.java:92)
| ... 30 more
| Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: Class com.bo.valueobjects.PersonRequest has no public constructors or the class reflects a primitive type or void
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:178)
| at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:126)
| at org.jboss.ws.jaxb.JBossXBUnmarshallerImpl.unmarshal(JBossXBUnmarshallerImpl.java:63)
| ... 31 more
| Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Class com.bo.valueobjects.PersonRequest has no public constructors or the class reflects a primitive type or void
| at org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtElementHandler.newInstance(RtElementHandler.java:961)
| at org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtElementHandler.startElement(RtElementHandler.java:728)
| at org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtElementHandler.startParticle(RtElementHandler.java:89)
| at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:504)
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:323)
| at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
| at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
| at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
| at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
| at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
| at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
| at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
| at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
| at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
| at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:174)
| ... 33 more
|
Is there a way that I can generate the WSDL in a way that the request can be properly resolved? Are there different annotations I could be using?
For now, I am just deploying a jar with this service and letting JBoss generate the wsdl at deploy time.
| public interface PersonRequest {
|
| public String getSsn();
| public void setSsn(String ssn);
|
| }
|
| public class PersonRequestImpl implements PersonRequest {
|
| private String ssn;
|
| public String getSsn() {
| return ssn;
| }
|
| public void setSsn(String ssn) {
| this.ssn = ssn;
| }
|
| }
|
| @Local
| public interface PeopleService {
|
| public String getPersonName(PersonRequest request);
|
| }
|
| @Stateless
| @WebService(name="PeopleService", targetNamespace="http://com.bo/peopleService")
| public class PeopleServiceImpl implements PeopleService {
|
| @WebMethod
| public String getPersonName(PersonRequest request) {
| Logger.getLogger(getClass()).info("Request class: " + request.getClass());
| return "MyName";
| }
|
| }
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987557#3987557
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987557
18 years, 1 month
[JBossWS] - Standlone Client access jbossws over ssl
by atquake
As I know, I can set Standlone Client System Properties to enable ssl accessing:
| System.setProperty("javax.net.ssl.trustStore", sslstore);
| System.setProperty("javax.net.ssl.trustStorePassword", pass);
|
However, if the client need to use two different ssl connections, this will cause the problem. I just wonder whether there is an alternative way to create a web service over ssl. I saw there is a method in org.jboss.ws.jaxrpc.ServiceFactoryImpl as following:
| /**
| * Create a <code>Service</code> instance.
| *
| * @param wsdlURL URL for the WSDL document location
| * @param serviceName QName for the service.
| * @param mappingURL URL for the jaxrpc-mapping.xml document location
| * @param securityURL URL for the jboss-ws-security.xml file
| * @return Service.
| * @throws ServiceException If any error in creation of the specified service
| */
| public Service createService(URL wsdlURL, QName serviceName, URL mappingURL, URL securityURL) throws ServiceException
I guess maybe this is the solution but I have no idea about jboss-ws-security.xml. Can anybody help me?
Thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987543#3987543
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987543
18 years, 1 month
[JBossWS] - Deploying JDeveloper/Oracle webservices on JBossWS
by muted
Hi,
I've been trying to deploy a webservice created in JDeveloper on JBoss. I've tried to search for other messages on both these boards and Oracle's forums but haven't had much luck. The .war file doesn't deploy properly, the error message given is:
2006-11-21 11:31:38,351 ERROR [org.jboss.deployment.MainDeployer] Could not create deployment: file:/C:/jboss-4.0.5.GA/server/default/deploy/DashboardWS.war
| java.lang.ClassCastException: oracle.j2ee.ws.wsdl.xml.WSDLReaderImpl
| at org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:142)
| at org.jboss.ws.metadata.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:263)
| at org.jboss.ws.deployment.JSR109ServerMetaDataBuilder.buildMetaData(JSR109ServerMetaDataBuilder.java:90)
| at org.jboss.ws.deployment.ServiceEndpointDeployer.create(ServiceEndpointDeployer.java:78)
| at org.jboss.ws.integration.jboss.DeployerInterceptor.create(DeployerInterceptor.java:80)
| at org.jboss.ws.integration.jboss.DeployerInterceptorJSE.create(DeployerInterceptorJSE.java:83)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
| 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 $Proxy39.create(Unknown Source)
| at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| 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 $Proxy8.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
|
I'm running JBoss AS 4.0.5GA on Sun JDK 1.5.0_01, with JBossWS 1.0.4.
Is it even possible to deploy the web service and if it is, what steps should I take to accomplish it?
As a related note, I got the same ClassCastException when trying to implement a JBoss DII webservice client based on the same WSDL file we're using on the JDeveloper webservice.
-Pekka
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987504#3987504
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987504
18 years, 1 month
[JBossWS] - Re: NullPointerException using wstools
by mavalla
I found that the error is in lines like this in the schema files:
<xs:extension base="StringLength0to128">
If I change the type from StringLength0to128 to xs:string and now it passes the error.
The new lines are like this:
<xs:extension base="xs:string">
The StringLength0to128 is a type defined by the OTA specification as:
<xs:simpleType name="StringLength0to128">
<xs:annotation>
<xs:documentation xml:lang="en">Used for Character Strings, length 0 to 128</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:minLength value="0"/>
<xs:maxLength value="128"/>
</xs:restriction>
</xs:simpleType>
It seems that the wstools doesn't support "xs:extension base" with types defined in the schema but only simple types.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987499#3987499
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987499
18 years, 1 month