Document-based web services - WebLogic 8.1
Hi all,<br>
I'm exposing a stateless session bean method as a web service. The in/out parameters are XML documents so my method signature looks as follows:
<br><br>
public Document collectMessages( Document request )
<br><br>
Accordingly I want to use document-based web services. I use <b>servicegen</b> to create all server-side classes required for the web service.
<br><br>
I'm testing the service from the WebLogic provided test page. For document-based services, the text-area is initially populated with the following content
<br><br>
<pre><!-- Do not know how to create a sample instance for this part due to the following exception:java.lang.InstantiationException: org.w3c.dom.Document. Pls replace this with the correct XML before invoking the service. --->
<['http://www.revenue.ie/webservices/ris/rcm/webservices']:RcmCollectRequest/></pre>
<br><br>
When I invoke the service I get the following error:
<br><br>
<pre><!--RESPONSE.................-->
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<env:Body>
<env:Fault>
<faultcode>Client</faultcode>
<b><faultstring>Unable to find a matching Operation for this remote invocation <RcmCollectRequest>
</RcmCollectRequest>. Please check your operation name. </faultstring></b>
</env:Fault>
</env:Body>
</env:Envelope></pre>
<br><br>
I've searched for this error and seen it in the forum only a number of times. It seems as though some manual manipulation of the web-services.xml document can solve it. Does anyone have an example? My <b>web-services.xml</b> document looks as follows:
<br><br>
<pre><?xml version="1.0" encoding="UTF-8"?>
<web-services>
<web-service useSOAP12="false" targetNamespace="http://www.revenue.ie/webservices/ris/rcm/webservices" name="rcmmessageservices" style="document" uri="/">
<types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:stns="http://www.revenue.ie/webservices/ris/rcm/webservices" elementFormDefault="qualified" attributeFormDefault="qualified" targetNamespace="http://www.revenue.ie/webservices/ris/rcm/webservices">
<xsd:element type="xsd:anyType" name="RcmCollectRequest" nillable="true">
</xsd:element>
<xsd:element type="xsd:anyType" name="RcmCollectResponse" nillable="true">
</xsd:element>
</xsd:schema>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:stns="java:ie.revenue.rcm.ejb.session" elementFormDefault="qualified" attributeFormDefault="qualified" targetNamespace="java:ie.revenue.rcm.ejb.session">
<xsd:element type="stns:InvalidRequestException" name="InvalidRequestException">
</xsd:element>
<xsd:element type="stns:SystemUnavailableException" name="SystemUnavailableException">
</xsd:element>
<xsd:complexType name="InvalidRequestException">
</xsd:complexType>
<xsd:complexType name="SystemUnavailableException">
</xsd:complexType>
</xsd:schema>
</types>
<type-mapping>
<type-mapping-entry deserializer="weblogic.xml.schema.binding.internal.builtin.DocumentCodec" xmlns:p2="http://www.revenue.ie/webservices/ris/rcm/webservices" type="p2:RcmCollectResponse" serializer="weblogic.xml.schema.binding.internal.builtin.DocumentCodec" class-name="org.w3c.dom.Document">
</type-mapping-entry>
<type-mapping-entry deserializer="ie.revenue.rcm.ejb.session.SystemUnavailableExceptionCodec" xmlns:p3="java:ie.revenue.rcm.ejb.session" type="p3:SystemUnavailableException" serializer="ie.revenue.rcm.ejb.session.SystemUnavailableExceptionCodec" class-name="ie.revenue.rcm.ejb.session.SystemUnavailableException">
</type-mapping-entry>
<type-mapping-entry deserializer="ie.revenue.rcm.ejb.session.InvalidRequestExceptionCodec" xmlns:p4="java:ie.revenue.rcm.ejb.session" type="p4:InvalidRequestException" serializer="ie.revenue.rcm.ejb.session.InvalidRequestExceptionCodec" class-name="ie.revenue.rcm.ejb.session.InvalidRequestException">
</type-mapping-entry>
<type-mapping-entry deserializer="weblogic.xml.schema.binding.internal.builtin.DocumentCodec" xmlns:xsd="http://www.w3.org/2001/XMLSchema" type="xsd:anyType" serializer="weblogic.xml.schema.binding.internal.builtin.DocumentCodec" class-name="org.w3c.dom.Document">
</type-mapping-entry>
<type-mapping-entry deserializer="weblogic.xml.schema.binding.internal.builtin.DocumentCodec" xmlns:p1="http://www.revenue.ie/webservices/ris/rcm/webservices" type="p1:RcmCollectRequest" serializer="weblogic.xml.schema.binding.internal.builtin.DocumentCodec" class-name="org.w3c.dom.Document">
</type-mapping-entry>
</type-mapping>
<components>
<stateless-ejb name="ejbcomp0">
<ejb-link path="rcm-ejb-1.0.jar#CustomerMessageController">
</ejb-link>
</stateless-ejb>
</components>
<operations>
<operation name="collectMessages" method="collectMessages(org.w3c.dom.Document)" component="ejbcomp0">
<params>
<param style="in" xmlns:p1="http://www.revenue.ie/webservices/ris/rcm/webservices" type="p1:RcmCollectRequest" location="body" name="document" class-name="org.w3c.dom.Document">
</param>
<return-param xmlns:p2="http://www.revenue.ie/webservices/ris/rcm/webservices" type="p2:RcmCollectResponse" location="body" name="result" class-name="org.w3c.dom.Document">
</return-param>
<fault xmlns:p3="java:ie.revenue.rcm.ejb.session" type="p3:SystemUnavailableException" class-name="ie.revenue.rcm.ejb.session.SystemUnavailableException" name="SystemUnavailableException">
</fault>
<fault xmlns:p4="java:ie.revenue.rcm.ejb.session" type="p4:InvalidRequestException" class-name="ie.revenue.rcm.ejb.session.InvalidRequestException" name="InvalidRequestException">
</fault>
</params>
</operation>
</operations>
</web-service>
</web-services>
</pre>
<br><br>
Thanks in advance,<br>
Eoin
Hi Eoin,
I had the exact problem. Struggled a lot and still couldn't figure out. I think its a problem in 8.1. Not sure. Might want to check with the support guys. If you are struck with 8.1 and still couldn't figure out, AXIS would be a option for you. Just an FYI. Thats what we are doing now.
Luckily for us we are migrating to 9.1 and I just completed a POC for doc oriented webservices in 9.1. It works like a charm.
Thanks and good luck
- Aspert
Similar Messages
-
Can any one help me finding the example of document based web serives developed
using plain java classes.
I tried the way mentioned in documentation, if I use rpc style and pass xml as
string it is working fine. but if I use document base, it is not working.The example dom.zip doesn't work properly.
I got following error when I was running the example on JDeveloper 9.0.3. Any
suggestion ?
C:\JDEV903\jdk\bin\javaw.exe -ojvm -classpath C:\MyStudy\java\WS3\classes;C:\JDEV903\jdev\lib\jdev-rt.jar;C:\MyStudy\java\1\dom\client.jar;D:\bea\weblogic700\server\lib\webserviceclient+ssl.jar;D:\bea\weblogic700\server\lib\weblogic.jar;C:\JDEV903\jdev\lib\jdev-rt.jar;C:\JDEV903\soap\lib\soap.jar;C:\JDEV903\lib\xmlparserv2.jar;C:\JDEV903\jlib\javax-ssl-1_2.jar;C:\JDEV903\jlib\jssl-1_2.jar;C:\JDEV903\j2ee\home\lib\activation.jar;C:\JDEV903\j2ee\home\lib\mail.jar;C:\JDEV903\j2ee\home\lib\http_client.jar;C:\JDEV903\lib\xmlparserv2.jar;C:\JDEV903\lib\xmlcomp.jar
-Dhttp.proxyHost=proxy.ouhk.edu.hk -Dhttp.proxyPort=8080 -Dhttp.nonProxyHosts=localhost|ouhk-15msmdomah|sun17.ouhk.edu.hk|sun18.ouhk.edu.hk|www.ouhk.edu.hk|www4.ouhk.edu.hk
wl.client.wsServletClient
java.rmi.RemoteException: web service invoke failed; nested exception is:
javax.xml.soap.SOAPException: failed to serialize xml:weblogic.xml.schema.binding.SerializationException:
type mapping lookup failure on class=class weblogic.apache.xerces.dom.DocumentImpl
TypeMapping=TYPEMAPPING SIZE=0
javax.xml.soap.SOAPException: failed to serialize xml:weblogic.xml.schema.binding.SerializationException:
type mapping lookup failure on class=class weblogic.apache.xerces.dom.DocumentImpl
TypeMapping=TYPEMAPPING SIZE=0
void weblogic.webservice.core.DefaultPart.toXML(javax.xml.soap.SOAPElement, java.lang.Object,
weblogic.xml.schema.binding.SerializationContext, boolean, javax.xml.rpc.encoding.TypeMapping)
DefaultPart.java:260
void weblogic.webservice.core.DefaultMessage.toXML(javax.xml.soap.SOAPMessage,
java.lang.Object[])
DefaultMessage.java:455
java.lang.Object weblogic.webservice.core.DefaultOperation.invoke(java.util.Map,
java.lang.Object[], java.io.PrintStream)
DefaultOperation.java:403
java.lang.Object weblogic.webservice.core.DefaultOperation.invoke(java.util.Map,
java.lang.Object[])
DefaultOperation.java:359
java.lang.Object weblogic.webservice.core.rpc.StubImpl._invoke(java.lang.String,
java.util.Map)
StubImpl.java:225
java.lang.Object examples.dom.EchoDomServicePort_Stub.echoDom(java.lang.Object)
EchoDomServicePort_Stub.java:33
void wl.client.wsServletClient.main(java.lang.String[])
wsServletClient.java:76
Process exited with exit code 0.
Rajesh Mirchandani <[email protected]> wrote:
See if this helps
http://dev2dev.bea.com/direct/webservice/index.html
kaushik wrote:
Can any one help me finding the example of document based web serivesdeveloped
using plain java classes.
I tried the way mentioned in documentation, if I use rpc style andpass xml as
string it is working fine. but if I use document base, it is not working.--
Rajesh Mirchandani
Developer Relations Engineer
BEA Support -
Does DII support document based web service?
Hi,
I am writing a web service cleint DII, the web service is document based. I followed the sample in
https://bpcatalog.dev.java.net/nonav/soa/standalone-client/
Everything seems correct. When I call call.invoke, I got an exception saying "operation style: \"document\" not supported".
Here is the code fragment, can anyone tell me what's wrong or does DII support document based service?
Thanks a lot!
Y. Zhao
try {
ServiceFactory factory = ServiceFactory.newInstance();
service = factory.createService(new QName(EXTRACTURLSERVICE));
port = new QName(EXTRACTURLPORT);
} catch (Exception se) {
// throw new Exception("Can not create stock service: " + se.getMessage());
_endPointAddr = "http://www.atomic-x.com/xmlservices/HyperlinkExtractor.asmx";
_qnameNamespaceURI = new QName("ExtractUrl");
requestQname = new QName(NAMESPACE_URI, "ExtractUrl");
responseQname = new QName(NAMESPACE_URI, "ExtractUrlResponse");
Call call = null;
try {
call = service.createCall(port);
call.setTargetEndpointAddress(_endPointAddr);
call.setProperty(Call.SOAPACTION_USE_PROPERTY,
Boolean.TRUE);
call.setProperty(Call.SOAPACTION_URI_PROPERTY, "http://www.atomic-x.com/xmlservices/HyperlinkExtractor/ExtractUrl");
call.setProperty("javax.xml.rpc.encodingstyle.namespace.uri", "");
call.setProperty(Call.OPERATION_STYLE_PROPERTY, "document");
call.setProperty(Call.ENCODINGSTYLE_URI_PROPERTY, "literal");
call.addParameter("parameters", requestQname, ExtractUrl.class, ParameterMode.IN);
call.setReturnType(responseQname, ExtractUrlResponse.class);
result = (ExtractUrlResponse)call.invoke((Object[])params);
} catch (Exception ex) {
//throw new ServiceException("Can not get service: " + ex.getMessage());
String msg = ex.getMessage();
ex.printStackTrace();
}There shouldn't be any restriction on the type of payload that's specific to DII.
I did come across a similar message, but I found the cause back in the WSDL rather than the client code. Have a look at the WSDL and see if it mentions "RPC" meaning the web service is making available a remote procedure call interface. -
How to make Service Callout to Document (XML) Based Web Service Proxy
Hi,
I am receiving a String which is basically XML via MQ.
I want to do a Web Service Callout using the String based XML to a Proxy Service that is a Document Based Web Service.
When I make the call using the String as the input parameter, I get many PipeLine Exception errors on the console and it does not reach the Web Service.
Based on my readings, I believe that I need to place an XMLObject variable in the Service Callout instead of a String.
How do I do this?
I've tried the fn-bea:inlinedXML function but that does't seem to work.
Regards
AzizHi Anuj, seems that the problem was an invalid character in the Mq Message when I tried to apply the inlinedXML method to it.
This is resolved now.
The solution:
1) Assign Mq $Body to variable
2) Use Java Callout to remove special characters fn:string(body)
3) convert Java Output String to XML using inlinedXML xquery function
4) Do a replace on the $body node contents using the XML variable
5) Call Web Service.
if you dont do the XML conversion, the web service throws a Pipeline Exception. -
Urgent: Calling a WebLogic document type Web Service
We have created an one-way, document type web service that works fine with the
clientgen client. When sending the same SOAP message to the service from another
client, it fails with: javax.xml.soap.SOAPException: failed to receive message:
The other client recieves an HTTP 500.
The signature for the service method is:
public void getDiag(Diagnostic diag)
Diagnostic is a complex type generated by autotype from a schema.
The failing client builds the SOAP message and sends it to the WebLogic service
using HttpURLConnection with the request method set to POST and content-type to
text/xml.Is there any error on the server?
Did the method on the end componet invoked?
If you are using WLS 8.1, its better to use SAAJ
instead of plain http url connection. Something like:
SOAPConnectionFactory factory =
SOAPConnectionFactory.newInstance();
SOAPConnection connection =
factory.createConnection();
SOAPMessage response =
connection.call( request, targetURL );
Here is a working example:
http://manojc.com/?sample23
RouterHandler.java
Regards,
-manoj
http://manojc.com
"Steve Watson" <[email protected]> wrote in message
news:3ec13eeb$[email protected]..
>
We have created an one-way, document type web service that works fine withthe
clientgen client. When sending the same SOAP message to the service fromanother
client, it fails with: javax.xml.soap.SOAPException: failed to receivemessage:
>
The other client recieves an HTTP 500.
The signature for the service method is:
public void getDiag(Diagnostic diag)
Diagnostic is a complex type generated by autotype from a schema.
The failing client builds the SOAP message and sends it to the WebLogicservice
using HttpURLConnection with the request method set to POST andcontent-type to
text/xml. -
AxisFault seen while invoking document style web service
I am seeing the following stacktrace when I try to invoke a document-style web service.
<partnerRole name="MyWebService1_Role">
<ServiceName>{http://idm.oracle.com/}MyWebService1</ServiceName>
<PortType>{http://idm.oracle.com/}MyWebService1</PortType>
<Address>null</Address>
</partnerRole>
<conversationId>bpel://localhost/default/ProvisioningFromDAS~1.0/4202-BpInv0-BpSeq0.3-3</conversationId>
<properties>{}</properties>
</partnerLink>
<2005-09-06 09:23:37,650> <DEBUG> <default.collaxa.cube.ws> <WSIFInvocationHandler::invoke> Fault happened
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
faultSubcode:
faultString: caught exception while handling request: expected element is missing: {http://idm.oracle.com/}attribute
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:caught exception while handling request: expected element is missing: {http://idm.oracle.com/}attribute
at org.collaxa.thirdparty.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
at org.collaxa.thirdparty.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
at org.collaxa.thirdparty.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1083)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
What could this mean ?Hi,
I am getting a similar issue. I created a Document-style/literal webservice and deployed on Weblogic 9.2 . Then I generated client stubs using clientgen. I get the following exception stack trace:
java.rmi.RemoteException: web service invoke failed: javax.xml.soap.SOAPException:
failed to serialize class java.lang.Objectweblogic.xml.schema.binding.SerializationException: type mapping lookup failure on
class=class com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl TypeMapping=TYPEMAPPING SIZE=3
ENTRY 1:
class: java.lang.Object
xsd_type: ['http://xmlns.ozarkexpress.com/business/sell']:stns:echoDocumentResponse
ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@1125127
deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@18dfef8
ENTRY 2:
class: java.lang.Object
xsd_type: ['http://xmlns.ozarkexpress.com/business/sell']:stns:echoDocument
ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@15e83f9
deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@2a5330
ENTRY 3:
class: java.lang.Object
xsd_type: ['http://www.w3.org/2001/XMLSchema']:xsd:anyType
ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@bb7465
deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@d6c16c -
Trouble Communicating with Document-Style Web Service
I have a flash app that currently communicates with a
RPC-style web service. I changed the web service to be
document-style, and the flash app no longer sends valid requests. I
was under the impression that one could simple swtich styles, and
flash would play along. Apparently, this is not the case. Does
anyone have an insight in this area?Clarified with Partick Calahan, who is maintaining this tool.
Currently, doc style is not handled by this tool. I guess it will be
supported in the future.
Thanks.
"Karthik V" <[email protected]> wrote in message
news:[email protected]..
I'm using WebLogic Webservice Explorer v.02 (WEX).
I'm able to test rpc style web services without any problem.
But whenever I try to open a document style web service WSDL, I get the
following exception.
I would appreciate if you have any suggestions for the to over come this
issue.
java.lang.IllegalArgumentException at
weblogic.webservice.tools.wex.MessagePanel.<init>(MessagePanel.java:33)at
>
weblogic.webservice.tools.wex.ServicePanel.operationChanged(ServicePanel.jav
a:153) at
weblogic.webservice.tools.wex.ServicePanel.portChanged(ServicePanel.java:133
) at
weblogic.webservice.tools.wex.ServicePanel.serviceChanged(ServicePanel.java:
121) at
weblogic.webservice.tools.wex.ServicePanel.<init>(ServicePanel.java:69)at
>
weblogic.webservice.tools.wex.tasks.FetchWsdlTask.perform(FetchWsdlTask.java
:45) at
weblogic.webservice.tools.wex.tasks.TaskQueue.run(TaskQueue.java:47) at
java.lang.Thread.run(Unknown Source) -
Problem deploying document style web service(urgent help required)
I am getting this particular exception on my browser when I am trying to view the list of services after having deployed the service. The exception and complete stack trace is follows. I have also included the portion of the WSDD file giving details about the service.
And now... Some Services
AXIS error
Sorry, something seems to have gone wrong... here are the details:
Exception - org.apache.axis.ConfigurationException: java.lang.ClassCastException
java.lang.ClassCastException
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSDDDeployableItem.java:302)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDDeployment.getHandler(WSDDDeployment.java:394)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:276)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.java:125)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDService.makeNewInstance(WSDDService.java:430)
at org.apache.axis.deployment.wsdd.WSDDDeployment.getDeployedServices(WSDDDeployment.java:503)
at org.apache.axis.configuration.FileProvider.getDeployedServices(FileProvider.java:296)
at org.apache.axis.transport.http.AxisServlet.reportAvailableServices(AxisServlet.java:482)
at org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
at java.lang.Thread.run(Thread.java:534)
org.apache.axis.ConfigurationException: java.lang.ClassCastException
java.lang.ClassCastException
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSDDDeployableItem.java:302)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDDeployment.getHandler(WSDDDeployment.java:394)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:276)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.java:125)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDService.makeNewInstance(WSDDService.java:430)
at org.apache.axis.deployment.wsdd.WSDDDeployment.getDeployedServices(WSDDDeployment.java:503)
at org.apache.axis.configuration.FileProvider.getDeployedServices(FileProvider.java:296)
at org.apache.axis.transport.http.AxisServlet.reportAvailableServices(AxisServlet.java:482)
at org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
at java.lang.Thread.run(Thread.java:534)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSDDDeployableItem.java:304)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDDeployment.getHandler(WSDDDeployment.java:394)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:276)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.java:125)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDService.makeNewInstance(WSDDService.java:430)
at org.apache.axis.deployment.wsdd.WSDDDeployment.getDeployedServices(WSDDDeployment.java:503)
at org.apache.axis.configuration.FileProvider.getDeployedServices(FileProvider.java:296)
at org.apache.axis.transport.http.AxisServlet.reportAvailableServices(AxisServlet.java:482)
at org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
at java.lang.Thread.run(Thread.java:534)
The snippet from the WSDD is as follows:
<handler name="RequestHandler" type="java:com.doc.service.DataHandler"/>
<service name="AddCalcService" provider="java:MSG">
<parameter name="allowedMethods" value="*"/>
<parameter name="className" value="com.doc.service.AddCalcService"/>
<requestFlow>
<handler type="RequestHandler"/>
</requestFlow>
<responseFlow>
<handler type="RequestHandler"/>
</responseFlow>
</service>
Could someone tell what the cause of this exception and how it could be resolved.Hi Bruce,
Thanks for all the links - am trudging through them now.
-Leena
Bruce Stephens <[email protected]> wrote:
Hi Lenna,
You might take a look at the SOAPBuilders interop tests.
See: http://www.whitemesa.com/r3/interop3.html and notice the DocLit
tests.
Our endpoints are http://webservice.bea.com:7001 and the code for the
client and servers can be located here:
http://webservice.bea.com/index.html#qz40
The good folks with WS-I have spent many cycles on interop issues. You
might have a look at their work:
http://www.ws-i.org/Profiles/Basic/2003-08/BasicProfile-1.0a.html
Hope this is of some value,
Bruce
leena wrote:
Hi,
I am trying to build a synchronous document-style web service, andthe bea
site doesnt seem to have much documentation on it. I have a samplewritten with
SOAPElement as the input and output of my method, no schemas, my reqand response
are anyType, but im not sure if that is the best way to go. AND, itdoesnt work
yet.
Can anyone point me to a place where i can look for information ?i am on weblogic
8.1. I would eventually also want my input/output xml to be definedby my schema.
I see in examples that DOM Documents may also be passed as parameters(inand out)
? is there any place i can read up on this and decide what the bestoption for
me is ? Also, i will be running a .Net client against this, so if thereis anything
i need to keep in mind, i would appreciate it if anyone gave me anyinfo.
Thanks in advance!
leena. -
Question about document/literal web service
Hello every body.
I have some question about document/literal web service.
I’ve been working with Axis before.
Axis has four valid signatures for your message-style service methods:
public Element [] method(Element [] bodies);
public SOAPBodyElement [] method (SOAPBodyElement [] bodies);
public Document method(Document body);
public void method(SOAPEnvelope req, SOAPEnvelope resp);
The same I am trying to do with WebLogic API for webservices.
But when I am trying to test web service (public Document method (Document body); )
I have serialized exceptions for org.w3c.dom.Document.
Do I have to write a custom class for org.w3c.dom.Document serialization?
If yes can you give me some idea or example?
The all idea behind this web service is. I have just one web service and mane classes for XML processing. Depends what xml document will be during runtime, web service will be using different class for xml processing. It works fine with Axis, but in case of WebLogic I have some problem.
One more question… How I have to call this web service from java client?
I have seen this example http://www.manojc.com/?sample31 ,
but this web service looks like (Document helloDom()). I need to send Document.
This example works for Dynamic Proxy, but does not work for static call.
Any ideas?? Thank in advance.Hi,
I am getting a similar issue. I created a Document-style/literal webservice and deployed on Weblogic 9.2 . Then I generated client stubs using clientgen. I get the following exception stack trace:
java.rmi.RemoteException: web service invoke failed: javax.xml.soap.SOAPException:
failed to serialize class java.lang.Objectweblogic.xml.schema.binding.SerializationException: type mapping lookup failure on
class=class com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl TypeMapping=TYPEMAPPING SIZE=3
ENTRY 1:
class: java.lang.Object
xsd_type: ['http://xmlns.ozarkexpress.com/business/sell']:stns:echoDocumentResponse
ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@1125127
deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@18dfef8
ENTRY 2:
class: java.lang.Object
xsd_type: ['http://xmlns.ozarkexpress.com/business/sell']:stns:echoDocument
ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@15e83f9
deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@2a5330
ENTRY 3:
class: java.lang.Object
xsd_type: ['http://www.w3.org/2001/XMLSchema']:xsd:anyType
ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@bb7465
deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@d6c16c -
We are using CF 7.01 and have been successful in consuming
web services in the past. We are unsuccessful however in consuming
a web service where the client says is using a message-based (aka
document style) web service. We are entering thier system but we
error out in our attempt to access thier web service.
In the cfcomponent I have even tried using style="document"
but we are still erroring out. The nature of the error message at
our end shows:
-- start of error message...
Message: Could not generate stub objects for web service
invocation.
Detail: Name:
https://integrationdev.peopleclick.com/soap/echo. WSDL:
https://integrationdev.peopleclick.com/soap/echo. WSDLException (at
/SOAP-ENV:Envelope): faultCode=INVALID_WSDL: Expected element '{
http://schemas.xmlsoap.org/wsdl/}definitions'.:
It is recommended that you use a web browser to retrieve and
examine the requested WSDL document for correctness. If the
requested WSDL document can't be retrieved or it is dynamically
generated, it is likely that the target web service has programming
errors.
-- ...end of error message.
The message insinuates a WSDL problem. I understand
message-based web services don't use a WSDL. Must I remove
something from our standard RPC-based web service configuration?
Thanks in advance.
Devhi all,
UPDATE:
i have some how managed to handle my error at both REQUEST MESSAGE peoplecode and at HANDLER peoplecode. Tested the webservice using SOAPUI tool. After passing all inputs required, the customer is not created and i am getting a blank response message which should contain the SETID and CUST_ID as response. Please help me out whether i am missing any Key part in creating a CUSTOMER. Note, i haven't written any Peoplecode for creation and i am also not aware how to do the same or where to write the logic for it.
Kindly bare with me and do help me out as i m struck with it for long. Thanks in advance -
How do I create a "document-centric" Web Service?
By document-centric I'm talking about receiving a SOAP message on the server-side, where the initial parsing and security processing (this aspect is very important) is performed but then allowing the developer to access the delivered "payload", i.e. the XML, and perform whatever mapping/processing that is required without automatically mapping to the "standard" auto-generated Java objects.
It is important that the client receives the "full" complex WSDL and can therefore generate their proxy classes with whatever tool (or language) that is appropriate.
On the server side we do not want to create hundreds (if not thousands) of Java Bean clases as we already have the legacy code to map XML to Java. The idea is that JAX-RPC only instantiates the SOAPElements that represent the "raw" message, or, if possible, doesn't instantiate any objects whatsoever.
I've spent many days now trying to find a single well-worked example for this type of Web Service without success - many, many references of the style "..and you can then create a document style web service.." but without the all important "how".
From what I've read a custom type-mapping and/or serializer/deserializer could be the answer but again no good, solid examples are forthcoming.
Another alternative seems to be to create the server side stub-classes using a "dummy" WSDL with the elements set to "anyType" but then distribute the "genuine" WSDL to the clients - we've got a simple example of the kind working but I don't like the idea of "tricking" the system in this way.
I'm working with WASD 5.1, which in theory conforms with JAX-RPC so any ideas offered here should also apply in that environment.
Has ANYONE successfully created a service of this type?
Any help with this issue would be very much appreciated and rewarded (with Duke Dollars of course).
Chris.Chris,
I too noticed that most vendors take the RPC centric approach. Its because most of the industry examples of how WSs were used were simple enough to implement using RPC and anything more (document literal) would add to the complexity of implementation. This is something that is feared by many developers, especialy the .Net crowd who seem to want everything done through a wizard menu interface and don't care about other WS implementations at all.
This is sort of changing. J2EE 1.4 is WS-I compliant, so when you compile server side ties from WSDL you can specify a document literal option and WS-I compliance. This gives you access to the SOAPElement objects. There's still issues with going between W3C DOM and SOAP elements but that's just API inconvenience, not a show stopper. As the inudustry develops more complex WSs we will see the vendors change their tools to better support this...
Anyway, some more help...
I use the the following wscompile options to build from WSDL for document literal WSs.
wscompile.bat -d . -nd . -s . -f:documentliteral -f:wsi -keep -model model.gz -import config.xml
wscompile.bat -d . -nd . -s . -f:documentliteral -f:wsi -keep -model model.gz -gen:server config.xml
My "wrapper" elements look like this...
<xs:element name="AComplexXMLResponse">
<xs:complexType>
<xs:sequence>
<xs:element ref="myNS:MYComplexXMLType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
If I do this:
<xs:element name="ASimpleXMLResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="AName" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
I still get the JAXRPC language bindings to a string, but in my case I don't really care. This may well be different for you.
What I do to manage these elements is to split up the WSDL, WS wrapper element definitions and actual data XML schema definitions into separate documents. This means I have a WSDL which IMPORTS my message schema (this is where I define wrappers for in and out XML) which INCLUDES the actual DATA XML schema that I have.
The WSDL import looks like this:
<types>
<xs:schema>
<xs:import namespace="http://schemaURI" schemaLocation="./relativePath/WrapperElementSchema.xsd"/>
</xs:schema>
</types>
The wrapper element schema has:
<xs:include schemaLocation="./ActualDataSchema.xsd"/>
This way I can easily replace the wrapper documents with just anyType references if something doesn want to play nice. The data schema file and the WSDL stay the same. This minimises the impact on what you have to change in your distribution. This is important as the WSDL is often generated on the fly by your WS environment and so can not be easily changed once you build your WSs, but the schema files it references are easily changed without affecting your code.
Another reason for the wrapper elements was a JWSDP 1.2 issue (I don't know if this has been fixed in 1.3), where if you had the same method parameter signature in a web service (the parameters it took were the same XML types, for instance if you have an add and update methods for the same document input) JWSDP would get confused at runtime. It did not take account of the SOAP action that came along with the request to determine which operation to call. It just took the incoming XML, saw that it was of a certain type and it passed it to the first operation that took this element, which is VERY wrong. By using the wrapper elements, I could give all my input and output elements for each method different names (I used a naming stragegy that appended a 'request' or 'response' string to the method name to form a method parameter element name. This is a pain in the ass, but works and does wonders for interoperability with other WS vendors. Like I said before, I've got this working with JWSDP, BEA and .Net servers and clients.
Hope this helps,
If you think there is a real need for a public HOWTO on this, I could write one with a full step by step guideline that shows where I broke my legs getting this stuff to work. But this would eat into my sleep time :-/ TO JUDGE INTEREST I call on all people interested in a tutorial to respond to this thread (esp people involved with the JWSDP WS tutorial documentation). If I get 5 or more different people responding I will loose some sleep for the good of this community. Otherwise, I will just try to help you when I have time to read the forums.
Kuba -
URGENT: Error while invoking soap-based web service from BPEL process
I am trying to invoke a soap-based web service deployed in a different OC4J container but on the same iAS middle tier install as the BPEL server. The deployment is successful. I am running 10.1.2 BPEL server.
But invoking a process throws the following error.
<remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
<part name="summary">
<summary>when invoking locally the endpoint 'http://stadd53.us.oracle.com:7779/idm/ProvService/cps', ; nested exception is: ORABPEL-02052 Cannot lookup BPEL domain. The BPEL domain "ProvService" cannot be found; the domain may not have initialized properly. Please verify that the BPEL domain loader has a valid set of initialization properties in the application properties file.</summary>
</part>
<part name="detail">
<detail>ORABPEL-02052 Cannot lookup BPEL domain. The BPEL domain "ProvService" cannot be found; the domain may not have initialized properly. Please verify that the BPEL domain loader has a valid set of initialization properties in the application properties file.</detail>
</part>
</remoteFault>
Any ideas on what the problem might be ?Sandor,
Thanks. Your suggestion of turning off optSoapShortcut worked. So does that mean that by default remote web services cannot be invoked from BPEL process by SOAP - unless this configuration change is done ? -
How to call an ABAP based web service from a web page (form)
Hi,
I am trying to figure out how I can call my own developed ABAP based web service. I was able to successfully test it in the WS navigator and am now wondering what I need to do to embed the service call in a plain simply web page (form). Basically I'd like to create a web form allowing to specify the parameters and with a 'Submit' button pass the parameters to the web service and launch it.
Is this possible or do I need some kind of SDK to accomplish this?
Thanks for any hints and tips.
WolfgangHi,
refer the following link and this is for cosuming the web service form Web dynpro Java
https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/50d70a19-45a3-2b10-bba0-807d819daf46&overridelayout=true
and please go throught the following link if you want to cosume it through web dynpro abap and find the answer given by the Moderator Thomas Jung
regards
Manohar -
Calling a document style web service using a pl/sql wrapper method
Just wanted to find out if anybody has a working example of invoking a document style web service from Oracle 10g database on a Unix environment.
We have java test class that invokes the web service, and we are trying to use a pl/sql wrapper to invoke a Java Web Service client. So far, we are encountering an End of File Communication error from Oracle which essentially terminates the session with the database.
On the Oracle application server side we are able to see a successful HTTP request made to the application server via server log, which is hosting the web service, since we are registering HTTP 200 success codes. However, we do not see any other errors from the application in the server logs. Most likely since the client side fails, before actually getting a chance to invoke the web service. This has been verified by commenting the client code leaving the print statements. The first call to the Service Factory method (XFire) to look up the service is where the PL/SQL procedure fails with an End of File communication error.Remove the when others section and see the actual error and post that.
http://tkyte.blogspot.com/2008/06/when-others-then-null-redux.html
http://tkyte.blogspot.com/2007/03/dreaded-others-then-null-strikes-again.html -
Document style web service receive and send org.w3c.Element
All,
I have created a simple Document-oriented web service and deployed to a standalone OC4J container using the following code:
********************* Interface ***********************
import org.w3c.dom.*;
interface PrimeNumberService
//method to check the primality of the number passed in Element variable
public Element isPrime(Element e) ;
******************** Implementation *******************
@version 1.0
Development Environment : Oracle9i JDeveloper
Name of the File : PrimeNumberServiceImpl.java
Creation/Modification History :
13-Apr-2002 Created
Overview:
This class file defines methods to implement PrimeNumberWebService.
The method isPrime() is exposed by the Web Service.
import org.w3c.dom.*;
import oracle.xml.parser.v2.*;
import java.io.*;
public class PrimeNumberServiceImpl implements PrimeNumberService
public PrimeNumberServiceImpl()
* This method is exposed by the Web Service to check if the number is
* prime. It extracts the number for input element and checks if it is
* prime or not and return the output in the XML Element.
* The input element is of the form <number>23</number>
public Element isPrime(Element e)
// define an XML Element that will be returned to the client
Element processedEl=null;
try{
// get the first clild of input element
Node enode = e.getFirstChild();
//get the value of input element and parse it
String value= enode.getNodeValue();
double number = Double.parseDouble(value);
String answer=null;
// check if the input number is prime
answer = checkPrime(number);
// create element from the answer
processedEl =createElement(answer);
}catch(Exception ex){
ex.printStackTrace();
return null;
// return output to client
return processedEl;
* This method creates an XML element from the input string values and return it
* The Element is of the form <answer>value</answer>
private Element createElement(String value){
// create a Document object
Document xmldoc = new XMLDocument();
// create an element with name "answer"
Element e1 = xmldoc.createElement("answer");
// append the element to document object
xmldoc.appendChild(e1);
// create a Text object from input values and append it to above element
Text t = xmldoc.createTextNode(value);
e1.appendChild(t);
return (Element)xmldoc.getFirstChild();
* This method check if the input number is prime or not
private String checkPrime(double num){
//For a prime number mod(power(2,number),number) is equal to 2
if ( Math.IEEEremainder( Math.pow(2.0,num) ,num)==2){
System.out.println ("the number is: " + num);
return "The number " + num + " is prime";}
else{
System.out.println ("the number is: " + num);
return "The number " + num + " is not prime";}
************************ Generated WSDL ***************
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="PrimeNumberService"
targetNamespace="http://tempuri.org/PrimeNumberService.wsdl"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://tempuri.org/PrimeNumberService.wsdl"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" >
<documentation>
WSDL for Service: PrimeNumberService, generated by Oracle WSDL toolkit (version: 1.1)
</documentation>
<types>
<schema targetNamespace="http://tempuri.org/PrimeNumberService.xsd" xmlns:tns="http://tempuri.org/PrimeNumberService.xsd" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
</types>
<message name="isPrimeOutput">
<part name="return" element="xsd:any"/>
</message>
<message name="isPrimeInput">
<part name="param0" element="xsd:any"/>
</message>
<portType name="PrimeNumberServicePortType">
<operation name="isPrime">
<input message="tns:isPrimeInput"/>
<output message="tns:isPrimeOutput"/>
</operation>
</portType>
<binding name="PrimeNumberServiceBinding" type="tns:PrimeNumberServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
<operation name="isPrime">
<soap:operation soapAction="urn:PrimeNumberService/isPrime"/>
<input>
<soap:body use="literal" namespace="urn:PrimeNumberService"/>
</input>
<output>
<soap:body use="literal" namespace="urn:PrimeNumberService"/>
</output>
</operation>
</binding>
<service name="PrimeNumberService">
<port name="PrimeNumberServicePort" binding="tns:PrimeNumberServiceBinding">
<soap:address location="http://hp-xeon-01:9799/primenumberws/primenumberService"/>
</port>
</service>
</definitions>
I get the following error when trying to deploy:
Error:
[Error ORABPEL-10902]: compilation failed
[Description]: XML parsing failed because "undefined part element.
In WSDL at "http://hp-xeon-01:9799/primenumberws/primenumberService?WSDL", message part element "{http://www.w3.org/2001/XMLSchema}any" is not defined in any of the schemas.
Please make sure the spelling of the element QName is correct and the WSDL import is complete.
[Potential fix]: n/a.
Please let me know what I'm doing wrong.
Regards,
JeffHere is the error code that I'm getting at the invoke:
<remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
<part name="code">
<code>Client</code>
</part>
<part name="summary">
<summary>parsing error: oracle.xml.parser.v2.XMLParseException: Expected name instead of /.</summary>
</part>
<part name="detail">
<stackTrace xmlns="http://xml.apache.org/axis/">parsing error: oracle.xml.parser.v2.XMLParseException: Expected name instead of /. at org.collaxa.thirdparty.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221) at org.collaxa.thirdparty.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128) at org.collaxa.thirdparty.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1083) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(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 javax.xml.parsers.SAXParser.parse(Unknown Source) at org.collaxa.thirdparty.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:226) at org.collaxa.thirdparty.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:645) at org.collaxa.thirdparty.apache.axis.Message.getSOAPEnvelope(Message.java:424) at org.collaxa.thirdparty.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.collaxa.thirdparty.apache.axis.client.AxisClient.invoke(AxisClient.java:173) at org.collaxa.thirdparty.apache.axis.client.Call.invokeEngine(Call.java:2725) at org.collaxa.thirdparty.apache.axis.client.Call.invoke(Call.java:2708) at org.collaxa.thirdparty.apache.axis.client.Call.invoke(Call.java:1738) at com.collaxa.cube.ws.wsif.providers.axis.WSIFOperation_ApacheAxis.invokeAXISMessaging(WSIFOperation_ApacheAxis.java:1902) at com.collaxa.cube.ws.wsif.providers.axis.WSIFOperation_ApacheAxis.invokeRequestResponseOperation(WSIFOperation_ApacheAxis.java:1464) at com.collaxa.cube.ws.wsif.providers.axis.WSIFOperation_ApacheAxis.executeRequestResponseOperation(WSIFOperation_ApacheAxis.java:1029) at com.collaxa.cube.ws.WSIFInvocationHandler.invoke(WSIFInvocationHandler.java:455) at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:359) at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:161) at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__invoke(BPELInvokeWMP.java:605) at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__executeStatements(BPELInvokeWMP.java:317) at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:195) at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3501) at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1906) at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75) at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:101) at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:186) at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5604) at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1301) at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.createAndInvoke(CubeEngineBean.java:117) at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.syncCreateAndInvoke(CubeEngineBean.java:146) at ICubeEngineLocalBean_StatelessSessionBeanWrapper0.syncCreateAndInvoke(ICubeEngineLocalBean_StatelessSessionBeanWrapper0.java:483) at com.collaxa.cube.engine.delivery.DeliveryHandler.initialRequestAnyType(DeliveryHandler.java:489) at com.collaxa.cube.engine.delivery.DeliveryHandler.initialRequest(DeliveryHandler.java:425) at com.collaxa.cube.engine.delivery.DeliveryHandler.request(DeliveryHandler.java:132) at com.collaxa.cube.ejb.impl.DeliveryBean.request(DeliveryBean.java:82) at IDeliveryBean_StatelessSessionBeanWrapper22.request(IDeliveryBean_StatelessSessionBeanWrapper22.java:479) at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:101) at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:65) at ngDoInitiate.jspService(_ngDoInitiate.java:220) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:347) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:810) at com.evermind.server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:121) at com.evermind.server.http.EvermindPageContext.include(EvermindPageContext.java:267) at displayProcess.jspService(_displayProcess.java:303) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:347) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:810) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322) at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:220) at com.collaxa.cube.fe.DomainFilter.doFilter(DomainFilter.java:138) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:649) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534)</stackTrace>
</part>
</remoteFault>
Maybe you are looking for
-
Can't get past Syncing mail accounts
Hello, As it says in the subject line, my iPhone won't get past Syncing mail accounts. If I deselect the mail account in iTunes then it syncs. I have looked this up and it seems that most people are pointing to a dialogue box that is hidden behind iT
-
How do I get my contacts from my Cingular RAZR to my MacBook Pro?
I did a quick search of the forum and did not find an answer to this specific question. I just switched over to Mac after being a long time PC user. Read many of the threads dealing with pairing the RAZR via bluetooth. I had no problem pairing my pho
-
IPad connects and shows a black screen
I have an iPad 2 and when it connects to the Apple TV using Airplay shows a Black screen. The Apple TV and the iPad are connected to the same WiFi. I can successfully connect from another iPad. I suspect I have a setting wrong somewhere.
-
Cannot View/Download Email Attachments - ActiveSync
Can View Emails, Contacts, etc..But when I click on an attachment, it acts like its downloading, but doesn't..Any ideas? I have full access to our companys exchange 2007 server, we also have sales people in the field who have pda's using activesync o
-
DAC as schedular tool for Informatica workflows(Not for OBIApps repository)
I have to use DAC as administrative / scheduler tool for Informatica workflows. Earlier, I configured the same for OBI Apps. It's running fine. Now I am not refering to Oracle_BI_DW_Base.rep which is the inbuilt repository provided with OBI Apps. I h