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,
Jeff

Here 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>

Similar Messages

  • Document Style web service in process - Please Help

    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,
    Jeff

    I think this thread is duplicate of "Document style web service receive and send org.w3c.Element" message thread.
    - Rakesh

  • 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.

  • DII client for accessing a document style web service

    Hi All,
    I try to access a document style web service using DII JAX-RPC client and used the wscompile tool to produce wrapper classes .
    The following code I used for my work:
    import java.rmi.RemoteException;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.Call;
    import javax.xml.rpc.Service;
    import javax.xml.rpc.ServiceFactory;
    import javax.xml.rpc.encoding.XMLType;
    import javax.xml.rpc.ParameterMode;
    import java.net.URL;
    import nutrient.*;
    public class NuDII{
    private static String endpoint =
    "http://www.strikeiron.com/webservices/usdadata.asmx?wsdl";
    private static String qnameService = "USDAData";
    private static String qnamePort = "USDADataSoap";
    private static String BODY_NAMESPACE_VALUE =
    "http://www.strikeiron.com/";
    private static String ENCODING_STYLE_PROPERTY =
    "javax.xml.rpc.encodingstyle.namespace.uri";
    private static String NS_XSD =
    "http://www.w3.org/2001/XMLSchema";
    private static String URI_ENCODING =
    "http://schemas.xmlsoap.org/soap/encoding/";
    private static String TYPE_NAMESPACE_VALUE =
    "http://www.strikeiron.com/";
    private static QName returnType = new QName(NS_XSD, "string");
    public static void main(String[] args) {
    try {
    ServiceFactory factory = ServiceFactory.newInstance();
    Service service = factory.createService(new QName(BODY_NAMESPACE_VALUE,qnameService));
    QName port = new QName(BODY_NAMESPACE_VALUE,qnamePort);
    QName operation = new QName(BODY_NAMESPACE_VALUE,"SearchFoodByDescription");
    Call call = service.createCall(port,operation);
    call.setTargetEndpointAddress(endpoint);
    call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
    call.setProperty(Call.SOAPACTION_URI_PROPERTY,"http://www.strikeiron.com/SearchFoodByDescription");
    call.setProperty(Call.ENCODINGSTYLE_URI_PROPERTY,"");
    call.setProperty(Call.OPERATION_STYLE_PROPERTY, "document");
    QName QNAME_TYPE_STRING = new QName(NS_XSD, "string");
    QName REQUEST_QNAME = new QName(TYPE_NAMESPACE_VALUE,"SearchFoodByDescription");
    QName RESPONSE_QNAME = new QName(TYPE_NAMESPACE_VALUE, "SearchFoodByDescriptionResponse");
    call.setReturnType(RESPONSE_QNAME, nutrient.SearchFoodByDescriptionResponse.class);
    //call.setReturnType(stringArray);
    call.setOperationName(new QName(BODY_NAMESPACE_VALUE,"SearchFoodByDescription"));
    call.addParameter("FoodKeywords", REQUEST_QNAME,nutrient.SearchFoodByDescription.class,ParameterMode.IN);
    call.addParameter("FoodGroupCode", REQUEST_QNAME, nutrient.SearchFoodByDescription.class,ParameterMode.IN);
    SearchFoodByDescription sfd = new SearchFoodByDescription("BabyFoods","1900");
    //Object[] params = new Object[2];
    //params[0]= new String("BabyFoods");
    //params[1]= new String("1900");try
    Object[] params = {sfd};
    Object result = call.invoke(params);
    System.out.println(result);
    } catch (Exception ex) {
    ex.printStackTrace();
    when I start to execute the client I got the following error:
    java.rmi.RemoteException: Server was unable to process request. --> Object refer
    ence not set to an instance of an object.
    at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:462)
    at NuDII.main(NuDII.java:68)
    Shall any body assist me to solve problem.

    you may have a little better luck in the JNI forum.

  • 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 Services in JDeveloper

    Hi,
    I have been creating Web Services in JDev using a simple java class which has the following signature:
    public boolean checkUserCredentials(String username, String password, int role)
    I would like to start working on more complex examples, specifically document style web services. It is my understanding that the non-wrapped document style services will return an XML type with a mapping class defined during the creation process.
    Can anyone point me to a good example of creating such a service in JDeveloper? It is my understanding that such a class would have a return type of XMLDocument, is that correct? If not do I define a custom object as a return type?
    I have searched on this topic, but couldn't find any good examples / documentation. Apologies if im missing something.
    Thanks

    Dev update: WSDL file seems fine. The problem is that it's for a document-bare service and, by default, the Unwrap Wrapped Parameters option on step 2 of the top-down wizard is enabled and checked. This means that we try to pick apart the input message into a series of parameters, yielding the error shown because a document-bare operation must have only one input parameter.
    If the Unwrap Wrapped Parameters option is unchecked, creation of the top-down service will succeed. In future, we ought to disable the option completely for everything but document-wrapped services, as that's the only time it applies.
    This is covered by bug 4630382.

  • Document style Web Service the standard?

    Hi,
    A colleague of mine just told me that we should not be building RPC style web services since document style are the standard now. Is this true? I couldn't find any such phrase in WS-I BP 1.0.
    If this is not true then is it even a possiblity that in future Document style will be the standard?
    Thanks, Sid.

    In this context I think your friend is using 'standard' to mean 'reasonably common and quite trendy at the moment'.
    RPC based WS was a bad idea in because it destroys some of the loose coupling you gain using WS rather than say, CORBA, which is the number three reason for using WS. (number one being your boss spent lots of money on the tools and would look silly if you don't use them, and number two being WS tunnelling through firewalls).
    Pete

  • Does UTL_HTTP support calling document style web service??

    Hi,
    I am exploring UTL_HTTP options for one of the web service call requirement at a customer site.
    Can any one tell if they have used UTL_HTTP for a document style service.
    If so, pls share the code.
    TIA,
    -Bhawani

    >
    wscompile -keep -verbose -import -f:documentliteral
    -f:nodatabinding config.xml
    wscompile -cp . -keep -verbose -gen:server
    serverconfig.xml
    [creating model: test]
    [creating service: Test]
    [creating port: MyIntf]
    [creating operation: callTXLife]
    error: Type "javax.xml.soap.SOAPElement" implements
    more than one interface, interfaces:
    "javax.xml.soap.Node", "org.w3c
    .dom.Element" ...
    I have the same problem with J2EE 1.4 AS Developer Release.

  • Problem in calling Document Style Web Service

    Hi,
    I have just downloaded the demos.zip available for WebServices on otn.
    I have deployed the stateful document webservice on the Oracle 10g AS
    Also i have followed all the steps mentioned in the UTL_DBWS callout utility.
    But i am confused with the setting of the request & response XMLTYPE for a webservice.
    I am attaching the code in which i have used to call a webservice kindly tell me if there is anything wrong in my approach
    CREATE OR REPLACE FUNCTION DOC_WBSRVC_TEST
    RETURN VARCHAR2
    AS
    SERVICE_ UTL_DBWS.SERVICE;
    CALL_ UTL_DBWS.CALL;
    SERVICE_QNAME UTL_DBWS.QNAME;
    PORT_QNAME UTL_DBWS.QNAME;
    XOPERATION_QNAME UTL_DBWS.QNAME;
    XSTRING_TYPE_QNAME UTL_DBWS.QNAME;
    RESPONSE XMLTYPE;
    REQUEST XMLTYPE;
    BEGIN
    --UTL_DBWS.SET_HTTP_PROXY ('172.17.24.12:8080');
    SERVICE_QNAME :=
    UTL_DBWS.TO_QNAME
    ('http://psc-pc0592.corp.satyam.ad/statefuldocws/docservice?WSDL',
    'StatefulDoc'
    SERVICE_ := UTL_DBWS.CREATE_SERVICE (SERVICE_QNAME);
    CALL_ := UTL_DBWS.CREATE_CALL (SERVICE_);
    UTL_DBWS.SET_TARGET_ENDPOINT_ADDRESS
    (CALL_,
    'http://psc-pc0592.corp.satyam.ad/statefuldocws/docservice'
    UTL_DBWS.SET_PROPERTY (CALL_, 'SOAPACTION_USE', 'TRUE');
    UTL_DBWS.SET_PROPERTY (CALL_, 'SOAPACTION_URI', 'urn:oracle:startShopping');
    UTL_DBWS.SET_PROPERTY (CALL_, 'OPERATION_STYLE', 'DOCUMENT');
    REQUEST :=
    XMLTYPE
    ( '<n:startShopping xmlns:n="urn:oracle:startShopping">'
    || '</n:startShopping>'
    RESPONSE := UTL_DBWS.INVOKE (CALL_, REQUEST);
    RETURN RESPONSE.EXTRACT
    ('//startShoppingOutput/child::text()',
    'xmlns="http://psc-pc0592.corp.satyam.ad/statefuldocws/docservice"'
    ).GETSTRINGVAL ();
    END;
    Thanks & Regards,
    MD

    Hi Aviad,
    thanks for your fast reply.
    But in Web Service Navigator my Web Service is not shown, because I used the SOAP Adapter.
    <b>My Web Service link:</b>
    http://<host>:<port>/XISOAPAdapter/MessageServlet?channel=:SRV_GBD_WS_GET_DEB_DETAIL:CC_GBD_WEBSERVICE_SENDER&amp;version=3.0&amp;Sender.Service=&amp;Interface=%5E*
    During executing Web Dynpro I got following errors:
    1. 'The system cannot find the path specified'.
    2. com.sap.tc.webdynpro.model.webservice.exception.WSModelRuntimeException: Exception on creation of service metadata for WSDL URL
    Regards,
    Mario

  • 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

  • Returning data with a doc style web service

    How does one return information using a "Document" style Web Service? WLS 8.1 restricts
    you to a single "in" parameter. Do I return information by using the "return"
    value from the Web Service (assuming it's synchronous)? If so, what are the restrictions
    on the return value. I've read the WLS 8.1 Programming Web Services document but
    it's pretty lite in the area of Document style Web Services.
    Thanks.

    WLS 8.1 supports two document styles:
    #1 document literal
    #2 document wrapped literal
    In the case of #1 a web service method can only
    take zero or one argument. There can be a return
    type (or void). The (single) argument or return type
    could be any supported type, or user defined complex
    types (java beans). In #1 the dispatch is done based
    on the incoming document and not based on the name
    of the method. You can find an example for this at:
    http://manojc.com/?sample13
    In the case of #2 a web service method can have
    any number of arguments. The WS container will
    wrap the method in to a complexType. Here,
    method name will be the name of the complexType
    and arguments will be added as elements of the
    complexType. In this case dispatch is done
    based on the method name. An example here:
    http://manojc.com/?sample14
    Regards,
    -manoj
    "Jack Ottofaro" <[email protected]> wrote in message
    news:3ea55b39$[email protected]..
    >
    How does one return information using a "Document" style Web Service? WLS8.1 restricts
    you to a single "in" parameter. Do I return information by using the"return"
    value from the Web Service (assuming it's synchronous)? If so, what arethe restrictions
    on the return value. I've read the WLS 8.1 Programming Web Servicesdocument but
    it's pretty lite in the area of Document style Web Services.
    Thanks.

  • Complex schemas using Document Literal Web Services

    I am trying to use document style web services and top down approach. I prepared a request, response and fault schema. In those schemas i have attributes defined. When i use WSCOMPILE, it does not generate proper classes, if the schema is too complex. It has worked only for simple schemas. Is there any other way of doing it?

    Hi!
    If you are using jwsdp 1.6 or earlier and I remember correctly this uses JAXB 1.0 for databinding, which doesnt support all schema constructs.. Even if I'm wrong on that, you could use the -f:nodatabinding option with wscompile and do your own databinding with for example xmlbeans, which supports all schema constructs and is far more flexible than jaxb 1.0 (= personal opinion ;-)
    good luck!
    /Ole

  • Message driven bean and message style web service

    Hi,
    I'm trying to deploy a message style web service with a message driven EJB as
    the receiver and am getting the following exception:
    <Jan 22, 2002 10:51:06 AM PST> <Warning> <EJB> <MessageDrivenBean threw an Exception
    in onMessage(). The exception was:
    java.lang.ClassCastException: weblogic.jms.common.ObjectMessageImpl
    java.lang.ClassCastException: weblogic.jms.common.ObjectMessageImpl
    at credit.message.PostDefaultPayment.onMessage(PostDefaultPayment.java:24)
    at weblogic.ejb20.internal.MDListener.execute(MDListener.java:254)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    public void onMessage(Message message) {
    System.out.println("onMessage");
    TextMessage textmessage = (TextMessage)message. // It is throwing
    the exception on this line --looks pretty normal
    Has anyone seen this before? Am I missing something?
    Thanks,
    Tim

    Hi Tim,
    I think the problem is that you are assuming that the data type, of the message
    argument to the onMessage(Message message) method in your MDB, is of type TextMessage.
    I agree that this seems logical, especially since you passed "a string" to the
    Message-style Web Service. However, this is not the case, because the WSDL uses
    the "xsd:anyType" as the data type for any argument you pass to the send() method
    ;-) This maps to a java.lang.Object in the WebLogic Web Services implementation,
    which is why you get the casting error. Try this instead:
    public void onMessage(Message msg)
         try
              String msgText;
              ObjectMessage objMessage = (ObjectMessage)msg;
              msgText = (String)objMessage.getObject();
    System.out.println("[PostDefaultPayment.onMessage(Message)] msgText=" + msgText);
    System.out.println("[PostDefaultPayment.onMessage(Message)] msg.getJMSType()="
    + msg.getJMSType());
    System.out.println("[PostDefaultPayment.onMessage(Message)] msg.getJMSCorrelationID()="
    + msg.getJMSCorrelationID());
    System.out.println("[PostDefaultPayment.onMessage(Message)] msg.getJMSMessageID()="
    + msg.getJMSMessageID());
         catch(Exception e)
    e.printStackTrace();
    Regards,
    Mike Wooten
    "Tim Uy" <[email protected]> wrote:
    >
    Hi,
    I'm trying to deploy a message style web service with a message driven
    EJB as
    the receiver and am getting the following exception:
    <Jan 22, 2002 10:51:06 AM PST> <Warning> <EJB> <MessageDrivenBean threw
    an Exception
    in onMessage(). The exception was:
    java.lang.ClassCastException: weblogic.jms.common.ObjectMessageImpl
    java.lang.ClassCastException: weblogic.jms.common.ObjectMessageImpl
    at credit.message.PostDefaultPayment.onMessage(PostDefaultPayment.java:24)
    at weblogic.ejb20.internal.MDListener.execute(MDListener.java:254)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    public void onMessage(Message message) {
    System.out.println("onMessage");
    TextMessage textmessage = (TextMessage)message. // It
    is throwing
    the exception on this line --looks pretty normal
    Has anyone seen this before? Am I missing something?
    Thanks,
    Tim

Maybe you are looking for