EJB v3 Compatibilities with Apache Axis
by Alan Scott
Is there any way to use an EJBv3 webservice deployed in jbossws with a
solution that is trying to access it via Apache Axis? The core issue is
that this is fromm a vendor system and for whatever reason the vendor
system has the params to our deployed web service mapped but when the
web service is invoked it is not getting any of the params.
Any assistance would be greatly appreciated.
17 years, 6 months
[JBossWS] - Schema Validation - Failed to read schema document
by bbucy
Trying to turn on Schema Validation for a webservice I have created. All is ok running without validation, wsconsume has no issues generating artifacts on the server side, nor any issues running wsconsume on client side, nor any issue running the client and getting a response from the server when schema validation is NOT enabled. But, as soon as I turn on schema validation, I get the following error on the server.
17:03:59,347 INFO [SOAPBodyElementDoc] Validating: XML_VALID
17:03:59,363 WARN [StrictlyValidErrorHandler] org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'OneCardTxnRequest.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
17:03:59,363 WARN [StrictlyValidErrorHandler] org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'OneCardTxnResponse.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
17:03:59,363 ERROR [StrictlyValidErrorHandler] org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'ocreq:OCReq' to a(n) 'element declaration' component.
17:03:59,363 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
org.jboss.ws.WSException: org.xml.sax.SAXException: src-resolve: Cannot resolve the name 'ocreq:OCReq' to a(n) 'element declaration' component.
at org.jboss.ws.WSException.rethrow(WSException.java:68)
at org.jboss.ws.core.soap.SOAPBodyElementDoc.validatePayload(SOAPBodyElementDoc.java:130)
at org.jboss.ws.core.soap.SOAPBodyElementDoc.transitionTo(SOAPBodyElementDoc.java:82)
at org.jboss.ws.core.soap.SOAPContentElement.getObjectValue(SOAPContentElement.java:173)
at org.jboss.ws.core.EndpointInvocation.transformPayloadValue(EndpointInvocation.java:263)
........
My wsdl does import two xml schemas that represent the request and response documents. Actually, had this as a single schema, but thought I'd break it up too see if the issue was dealing with both elements. Anways, a snippet of the wsdl is as follows.
<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ocreq="http://request.doc.onecard.exchange.hps.com/"
xmlns:ocrsp="http://response.doc.onecard.exchange.hps.com/"
xmlns:tns="http://ws.onecard.exchange.hps.com/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="http://ws.onecard.exchange.hps.com/">
<wsdl:types>
<xs:schema targetNamespace="http://ws.onecard.exchange.hps.com/" version="1.0" xmlns:tns="http://ws.onecard.exchange.hps.com/" xmlns:ocreq="http://request.doc.onecard.exchange.hps.com/" xmlns:ocrsp="http://response.doc.onecard.exchange.hps.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import schemaLocation="OneCardTxnRequest.xsd" namespace="http://request.doc.onecard.exchange.hps.com/"/>
<xs:import schemaLocation="OneCardTxnResponse.xsd" namespace="http://response.doc.onecard.exchange.hps.com/"/>
<xs:element name="doTransaction" type="tns:doTransaction"/>
<xs:element name="doTransactionResponse" type="tns:doTransactionResponse"/>
<xs:complexType name="doTransaction">
<xs:sequence>
<xs:element minOccurs="0" ref="ocreq:OCReq"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="doTransactionResponse">
<xs:sequence>
<xs:element minOccurs="0" ref="ocrsp:OCRsp"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
.................
</wsdl:definitions>
And a snippet of my Service implementation class is as follows.
@WebService(serviceName="OneCardService", portName = "OneCardInterface", endpointInterface="com.hps.exchange.onecard.ws.OneCardInterfaceType",
targetNamespace = "http://ws.onecard.exchange.hps.com/", wsdlLocation = "WEB-INF/wsdl/OneCard.wsdl" )
@SchemaValidation
public class OneCardInterface extends SpringBeanAutowiringSupport implements OneCardInterfaceType
{
......
}
I do actually generate my artifacts using wsconsume in a different project and then copy my wsdl and the two xml schemas to my WAR's WEB-INF/wsdl directory. Not sure, if that could be effecting anything. Kind of running around in circles at this point. Any ideas would be greatly, greatly appreciated. Thanks, Bob
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4159403#4159403
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4159403
17 years, 6 months
[JBossWS] - TypeNotPresentExceptionProxy when trying to get the Port of
by mnemonics
Hi,
We've generated code with wsimport (sun) from a wsdl and imported that in our webapp. When we try to get the port from the service (in order to make a web service call) it fails wirth the following error:
| java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
| at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:653)
| at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:460)
| at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:286)
| at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:222)
| at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)
| at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)
| at java.lang.Class.initAnnotationsIfNecessary(Class.java:3031)
| at java.lang.Class.getAnnotation(Class.java:2989)
| at java.lang.Class.isAnnotationPresent(Class.java:3001)
| at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.assertSEIConstraints(ServiceDelegateImpl.java:283)
| at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:180)
| at javax.xml.ws.Service.getPort(Service.java:143)
|
When running this code from a (simple) client with Java EE5 libraries (javaee.jar, webservices-rt.jr) it's ok.
But from within JBoss 4.2.2 it fails. We also tried the JBoss-ws update, but same problem.
Any ideas?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4159223#4159223
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4159223
17 years, 6 months