Web Service/XML-RPC: SMTP inbound to BC4J Xml Servlet bridge idea??

A new business problem just landed on my desk for a possible solution.
One way XML documents coming in from a Novel mail server doing SMTP forward to something
in the OC4J, BC4J, side to receive and parse the XML.
It would be great of course if the JDev / OC4J web services tools had a SMTP service
that would route inbound SMTP messages at email address to a particular Servlet.post().
Any other ideas??
Thanks much,
curt

For others, here is a start of a response to Curtis's message talking about the BC4J Web services features combined with the BC4J readXML and writeXML capabilities:
Re: Can we find when was a table dropped?
Not sure if other folks have a solution to dealing with the SMTP part - a snippet of code that works with readXML and writeXML methods of BC4J, for example.
Mike.

Similar Messages

  • Web service / XML-RPC:  SMTP inbound to OC4J/BC4J XML servlet bridge??

    A new business problem just landed on my desk for a possible solution.
    One way XML documents coming in from a Novel mail server doing SMTP forward to something
    in the OC4J, BC4J, side to receive and parse the XML.
    It would be great of course if the JDev / BC4J / OC4J web services tools had a SMTP service
    that would route inbound SMTP messages at email address to a particular Servlet.post().
    Any other ideas??
    Thanks much,
    curt

    For others, here is a start of a response to Curtis's message talking about the BC4J Web services features combined with the BC4J readXML and writeXML capabilities:
    Re: Can we find when was a table dropped?
    Not sure if other folks have a solution to dealing with the SMTP part - a snippet of code that works with readXML and writeXML methods of BC4J, for example.
    Mike.

  • Is it possible to connect to a web Service(JAX-RPC) with a middlet?

    Is it possible to connect to a web Service(JAX-RPC) with a middlet?

    Hi
    Check this article: http://developers.sun.com/sw/building/codesamples/j2me-client/index.html
    Mihai

  • Web Service/XML-RPC:  SMTP to BC4J web service bridge ??

    A new business problem just landed on my desk for a possible solution.
    One way XML documents coming in from a Novel mail server doing SMTP forward to something
    in the OC4J, BC4J, side to receive and parse the XML.
    It would be great of course if the JDev / OC4J web services tools had a SMTP service
    that would route inbound SMTP messages at email address to a particular Servlet.post().
    Any other ideas??
    Thanks much,
    curt

    I don't have answer for the SMTP binding as currently the Oracle9iAS J2EE Web Services engine doesn't support an SMTP binding (checking with product management to see if their is any solution today). I suspect this is a manual exercise parsing the SMTP message and extracting the SOAP message.
    However with BC4J you do get in Oracle9i JDeveloper 9.0.2 the ability to consume/publish SOAP messages. And the readXML and writeXML methods on the BC4J view objects help deal with the content of your SOAP messages. So some of the work has been done for you.
    If you haven't seen this already, here is what the publishing side looks like. First, if you build a remote method in your <applicationModule>impl.java file with a signature like (everything in "<xxx>" is specific to your implementation), you can publish it as a Web service. For example:
    import org.w3c.dom.*;
    import oracle.xml.parser.v2.*;
    public org.w3c.dom.Element getBC4JXMLDocument (String parm) {
    get<some BC4J view>().setWhereClause("<some column from your BC4J view>" = parm);
    // Assuming your column is a String :-)
    get<some BC4J view>().setWhereClauseParam(0, parm);
    return (Element)get<some BC4J view>().writeXML(1,Row.XML_OPT_ALL_ROWS);
    Then publish the application module method as a Web service (see: http://otn.oracle.com/products/ids/daily/may10.html)
    It is pretty easy to build a client from the WSDL that is generated using the JDev wizards. Once you have the stub your code would look something like:
    import org.w3c.dom.*;
    import oracle.xml.parser.v2.*;
    org.w3c.dom.Element x = stub.getBC4JXMLDocument("your_parameter");
    XSLProcessor l_processor = new XSLProcessor();
    XSLStylesheet l_xsl = l_processor.newXSLStylesheet(this.getClass().getClassLoader().getResourceAsStream("some.xsl"));
    l_processor.showWarnings(true);
    l_processor.setErrorStream(System.err);
    DocumentFragment l_result = l_processor.processXSL(l_xsl,(XMLElement)e);
    // now feed the transformed XML document into the receiving BC4J view object using the readXML method
    The neat thing, which I think is the gist of your message, is that you could then use the BC4J readXML message to parse the incoming XML message and inflate it back into a BC4J view object. The net result would be moving an entire dataset over SOAP to a BC4J client.
    The SMTP binding would have to worked into the stub code generated. I don't have sample code that would help here right now but will check around.
    Mike.

  • Web Service JAX-RPC/SOAP with JAXB

    Hello,
    During my research on JAX-RPC/SOAP as web service technology. I found only simple "helloworld" sample type what using simple String as aurgment. For my task, I required a more complex aurgment such as a complete contact info. I then did some sample code for JAXB and found it to be very useful as a XML/JAVA binding tool. It seems logical to use JAXB to parse and bind the complex aurgment. Though I have not seen any reference to this using it with JAX-RPC. Does JAX-RPC have the tool set to accomplish the same thing? JAX-RPC may have such thing, but using this JAXB seem logical, thus would I still "conform" to the JAX-RPC if I go this route. Any info would be much appreciative.
    Thanks in Advance,
    Mike

    The two JAX-RPC tools that I have used, the reference implementation and Apache Axis both have tools for mappiing XML to classes and vice-versa. Having used JAXB also, I have to say that both of these tools are much easier to use than JAXB.
    As far as whether it will conform, you can make a valid SOAP message using any tool you like.

  • PL/SQL Web Services - JAX-RPC returning in JSON format

    Hello all,
    I have been searching on the web, inclusively on this forum, for a way of returning data in a JSON format from a PL/SQL web service.
    The threads that I have found about this issue are still unanswered.
    Does anyone know if it is possible to create a JAX-RPC web service which returns in JSON format ?
    Regards,
    Pedro

    Hi,
    JAX-RPX services are SOAP services and thus return XML. You want to use REST instead
    Frank

  • J2ME and web services call (rpc)

    Hi to all.
    I need consume a web services with a blackberry app and his methods has the style "enconded/rpc" instead of "document/literal". Is it possible? I used the stub generator from WTK 2.5.2 but i encounter a error.
    Thanks in advance.
    Bruno.

    Check http://wireless.java.sun.com/midp/articles/. It should help you.

  • Assembler Service API Quick Starts Web service API, Response is not well-formed XML

    Hi,
    I am trying to get the "Assembler Service API Quick Start" webservice api example to work in a asp.net application.
    The following line produces the exception below.
    // Send the request to the Assembler Service
    AssemblerResult result = asOb.invoke( ddxDoc, inputMap, assemblerSpec );
    "Response is not well-formed XML. at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at AssemblerServiceService.AssemblerServiceService.invoke(BLOB inDDXDoc, mapItem[] inputs, AssemblerOptionSpec environment)"
    Any help would be greatly appreciated.
    Thanks
    cheeves
    (the code is exactly as it is in the example, except for adding "?blob=base64" to the url of the AssemblerServiceService obeject, and I have the 3 files in the root of my c drive)

    after looking at the example more closely I discovered that there is a key name called "optionsLink.pdf" that doesn't match the source in the DDX file.

  • Web services - JAX-RPC/Axis/OC4J

    Hi,
    We are planning to expose some of J2EE applications as web service. It is based on JAX-RPC 1.0. I have checked it with Apache-Axis without changing any code and it worked. Will it work in OC4J without any code changes?
    1. Does OC4J or Oracle SOAP server supports(or implements) JAX-RPC?
    2. Do we need to change any code?
    rgds
    Bala Murali

    Right now we have a JAX-RPC 1.1 with JSR 109 support preview here on OTN at - this came out at OracleWorld:
    http://otn.oracle.com/tech/java/oc4j/1003/content_preview.html
    The target production date is summer 2004. There are also plans to do another drop of this preview with updated support later this year and possibly again before the production release.
    We have quite a lot of functionality that we are targetting to flesh out our Web services support in the areas of reliability, orchestration, transactions and security.
    Mike.

  • Security Error in accessing Web service from Flex.Where to put crossdomain.xml in axis container?

    Hi guys.
    Typically webservices are invoked across domains. Flash has defined certain policies which prevent crossdomain access. The only way to bypass this security feature is to put a crossdomain.xml file within the server root of the webservice provider i.e. in our case at http://abc.com. A sample example of crossdomain.xml is as below:
    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
    <cross-domain-policy>
         <site-control permitted-cross-domain-policies="all" />
         <allow-access-from domain="*" secure="false"/>
         <allow-http-request-headers-from domain="*" headers="*" secure="false" />
    </cross-domain-policy>
    If the crossdomain.xml is not added the developer will get “Security Error accessing URL” type of messages.
    The above mentioned information should be enough for you to get your flex based WebService client up and running.
    We are using axis2 to build webservices. We deployed the webservices under axis2 container under repository/srvices folder . But in Flex when we try to call the webservices we were getting the exception saying security error in accessing url. The solution is we need to put the crossdomain.xml o that it is loaded at runtime and allow us to access. In tomcat if we put the file under ROOT directory we could accss the file and we were able to access the webservices deployed under Tomcat. But I googled for Axis2 container and couldnt find any solution.
    Please post the reply if anyone knows the solution to it.
    Thanks
    Raja

    Hi. So, I did take a quick look at the Axis2 standalone server and didn't see any way to server up a file such as crossdomain.xml. It seems like it might be a useful enhancement to have the ability to serve up files even if this functionality was very simple/limited and nothing like a full blown http server.
    I'd log an enhancement request against axis2 if this is something you'd like to have.
    http://issues.apache.org/jira/browse/AXIS2
    -Alex

  • Problems sending xml data as string to a web service

    Hello!
    I need to develop a client in order to invoke a web service. I have the WSDL of the web service, so I generate a web service proxy, from that WSDL, using JDeveloper 10.1.3.0.
    Among other things, that web service receive RPC request (binding style is RPC) and the request has only one parameter, which consists of a string. That string must be an XML document (that is, the web service receives one parameter which is a XML document as a String). I generate that parameter, and it looks like the following:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <inputMessage xmlns="http://ws/validacion" xmlns:xsi="http://www.w3.o
    rg/2001/XMLSchema-instance" xsi:SchemaLocation="http://localhost/ws/xsd/mservic/ws.xsd">
    <request>ServiceRequest</request>
    <versionMsg>1.0</versionMsg>
    <data>AAAAAAAAAAAAAA</data>
    </inputMessage>
    However, when I send the request and capture it through HTTPAnalyzer, I get the following:
    <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><MyWebService xmlns="http://soapinterop.org/"><myWebServiceRequest xsi:type="xsd:string" xmlns="">&lt;?xml version = '1.0' encoding = 'UTF-8'?>
    &lt;inputMessage xmlns="http://ws/validacion" xmlns:xsi="http://www.w3.o
    rg/2001/XMLSchema-instance" xsi:SchemaLocation="http://localhost/ws/xsd/mservic/ws.xsd">
    &lt;request>ServiceRequest&lt;/request>
    &lt;versionMsg>1.0&lt;/versionMsg>
    &lt;data>AAAAAAAAAAAAAA&lt;/data>
    &lt;/inputMessage></myWebServiceRequest></MyWebService></soapenv:Body></soapenv:Envelope>
    As you can see, the symbol '<' y replaced with '&lt;'.
    Why does it happen? Is there a way of avoiding that?
    Could anybody be so kind to help me, please?
    Thank you very much in advance.

    Hello!
    I need to develop a client in order to invoke a web
    service. I have the WSDL of the web service, so I
    generate a web service proxy, from that WSDL, using
    JDeveloper 10.1.3.0.
    Among other things, that web service receive RPC
    request (binding style is RPC) and the request has
    only one parameter, which consists of a string. That
    string must be an XML document (that is, the web
    service receives one parameter which is a XML
    document as a String). I generate that parameter, and
    it looks like the following:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <inputMessage xmlns="http://ws/validacion"
    xmlns:xsi="http://www.w3.o
    rg/2001/XMLSchema-instance"
    xsi:SchemaLocation="http://localhost/ws/xsd/mservic/ws
    .xsd">
    <request>ServiceRequest</request>
    <versionMsg>1.0</versionMsg>
    <data>AAAAAAAAAAAAAA</data>
    nputMessage>
    However, when I send the request and capture it
    through HTTPAnalyzer, I get the following:
    <?xml version="1.0"
    encoding="UTF-8"?><soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelop
    e/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body><MyWebService
    xmlns="http://soapinterop.org/"><myWebServiceRequest
    xsi:type="xsd:string" xmlns=""><?xml version =
    '1.0' encoding = 'UTF-8'?>
    <inputMessage xmlns="http://ws/validacion"
    xmlns:xsi="http://www.w3.o
    rg/2001/XMLSchema-instance"
    xsi:SchemaLocation="http://localhost/ws/xsd/mservic/ws
    .xsd">
    <request>ServiceRequest</request>
    <versionMsg>1.0</versionMsg>
    <data>AAAAAAAAAAAAAA</data>
    ;/inputMessage></myWebServiceRequest></MyWebService></
    soapenv:Body></soapenv:Envelope>
    As you can see, the symbol '<' y replaced with
    '<'. (I hope you can see it now)
    The symbol '<' is replace with '& l t ;' (with no whitespaces)
    >
    Why does it happen? Is there a way of avoiding that?
    Could anybody be so kind to help me, please?
    Thank you very much in advance.

  • JAX-RPC vs OC4J J2Ee web service

    Hi,
    Currently we use Oracle10G 10.0.3 developer preview edition. we deployed same web service on both JAX-RPC platfrom and OC4J J2EE web service platfrom (RPC encoding style). We found that old platform seems to perform better than JAx-RPC platfrom with regard to serialization and de-serialzation. We also did the test on Doc/literal style in JAX-RPC platfrom and its performance is not as good as the one deployed on old platform. We understand JAX-RPC is new implementation and Oracle10.0.3 is under developer preview edition and so it may not be optimized. We have following questions
    1. Is this a known issue in JAX-RPC platform?
    2. Is there anyway to optimize JAX-RPC web service? Like using different XMl parser (instead of Oracle XML parser)
    3. When is the final release of 10.0.3 expected?
    4. Will Oracle be supporting old web service platfrom (OC4J J2EE web service platform)? If so how long?
    Thanks and regards
    __Hari

    Hi,
    Currently we use Oracle10G 10.0.3 developer preview edition. we deployed same web service on both JAX-RPC platfrom and OC4J J2EE web service platfrom (RPC encoding style). We found that old platform seems to perform better than JAx-RPC platfrom with regard to serialization and de-serialzation. We also did the test on Doc/literal style in JAX-RPC platfrom and its performance is not as good as the one deployed on old platform. We understand JAX-RPC is new implementation and Oracle10.0.3 is under developer preview edition and so it may not be optimized. We have following questions
    1. Is this a known issue in JAX-RPC platform?
    2. Is there anyway to optimize JAX-RPC web service? Like using different XMl parser (instead of Oracle XML parser)
    3. When is the final release of 10.0.3 expected?
    4. Will Oracle be supporting old web service platfrom (OC4J J2EE web service platform)? If so how long?
    Thanks and regards
    __Hari

  • Web Service error com.sun.xml.ws.fault.SOAPFaultBuilder.disableCaptureStack

    Hi,
    I have implemented a Java class which calls some XML RPC 3.0 proxy methods.
    If I test the method input inside a "main ()" method and get the output, it works nice.
    The XML RPC 3.0 procy method is also invoked and there is no problem.
    However, when I expose this java class as a "web service" and invoke the web service from the JDeveloper integrated console or
    even an external test client running on a browser, I get the error mentioned below.
    Which setting must be defined in the JDevelopper ( Studio Edition Version 11.1.1.2.0 on :
    set com.sun.xml.ws.fault.SOAPFaultBuilder.disableCaptureStackTrace system property to false"
    class="java.lang.NoClassDefFoundError"
    +++++++++ Integrated WebLogic server ( + Integrated WebLogic server started on port 7101) +++++++++
    [Running application AllCustomers on Server Instance IntegratedWebLogicServer...]
    [02:47:42 PM] ---- Deployment started. ----
    [02:47:42 PM] Target platform is (Weblogic 10.3).
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Thanks
    YL
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Body>
    <S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope">
    <faultcode>S:Server</faultcode>
    <faultstring>org/opensource/proxy/OpenSourceApiXmlRpcProxy</faultstring>
    <detail>
    <ns2:exception xmlns:ns2="http://jax-ws.dev.java.net/" note="To disable this feature, set com.sun.xml.ws.fault.SOAPFaultBuilder.disableCaptureStackTrace system property to false" class="java.lang.NoClassDefFoundError">
    <message>org/opensource/proxy/OpenSourceApiXmlRpcProxy</message>
    <ns2:stackTrace>
    <ns2:frame line="246" file="GetAllCustomers.java" method="GetOneCustomerWithProxy" class="com.std.customer.GetAllCustomers" />
    <ns2:frame line="native" file="NativeMethodAccessorImpl.java" method="invoke0" class="sun.reflect.NativeMethodAccessorImpl" />
    <ns2:frame line="39" file="NativeMethodAccessorImpl.java" method="invoke" class="sun.reflect.NativeMethodAccessorImpl" />
    <ns2:frame line="25" file="DelegatingMethodAccessorImpl.java" method="invoke" class="sun.reflect.DelegatingMethodAccessorImpl" />
    <ns2:frame line="597" file="Method.java" method="invoke" class="java.lang.reflect.Method" />
    <ns2:frame line="101" file="WLSInstanceResolver.java" method="invoke" class="weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker" />
    <ns2:frame line="83" file="WLSInstanceResolver.java" method="invoke" class="weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker" />
    <ns2:frame line="152" file="InvokerTube.java" method="invoke" class="com.sun.xml.ws.server.InvokerTube$2" />
    <ns2:frame line="264" file="EndpointMethodHandler.java" method="invoke" class="com.sun.xml.ws.server.sei.EndpointMethodHandler" />
    <ns2:frame line="93" file="SEIInvokerTube.java" method="processRequest" class="com.sun.xml.ws.server.sei.SEIInvokerTube" />
    <ns2:frame line="604" file="Fiber.java" method="__doRun" class="com.sun.xml.ws.api.pipe.Fiber" />
    <ns2:frame line="563" file="Fiber.java" method="_doRun" class="com.sun.xml.ws.api.pipe.Fiber" />
    <ns2:frame line="548" file="Fiber.java" method="doRun" class="com.sun.xml.ws.api.pipe.Fiber" />
    <ns2:frame line="445" file="Fiber.java" method="runSync" class="com.sun.xml.ws.api.pipe.Fiber" />
    <ns2:frame line="275" file="WSEndpointImpl.java" method="process" class="com.sun.xml.ws.server.WSEndpointImpl$2" />
    <ns2:frame line="454" file="HttpAdapter.java" method="handle" class="com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit" />
    <ns2:frame line="250" file="HttpAdapter.java" method="handle" class="com.sun.xml.ws.transport.http.HttpAdapter" />
    <ns2:frame line="140" file="ServletAdapter.java" method="handle" class="com.sun.xml.ws.transport.http.servlet.ServletAdapter" />
    <ns2:frame line="319" file="HttpServletAdapter.java" method="run" class="weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke" />
    <ns2:frame line="232" file="HttpServletAdapter.java" method="post" class="weblogic.wsee.jaxws.HttpServletAdapter" />
    <ns2:frame line="310" file="JAXWSServlet.java" method="doPost" class="weblogic.wsee.jaxws.JAXWSServlet" />
    <ns2:frame line="727" file="HttpServlet.java" method="service" class="javax.servlet.http.HttpServlet" />
    <ns2:frame line="87" file="JAXWSServlet.java" method="service" class="weblogic.wsee.jaxws.JAXWSServlet" />
    <ns2:frame line="820" file="HttpServlet.java" method="service" class="javax.servlet.http.HttpServlet" />
    <ns2:frame line="227" file="StubSecurityHelper.java" method="run" class="weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction" />
    <ns2:frame line="125" file="StubSecurityHelper.java" method="invokeServlet" class="weblogic.servlet.internal.StubSecurityHelper" />
    <ns2:frame line="292" file="ServletStubImpl.java" method="execute" class="weblogic.servlet.internal.ServletStubImpl" />
    <ns2:frame line="26" file="TailFilter.java" method="doFilter" class="weblogic.servlet.internal.TailFilter" />
    <ns2:frame line="56" file="FilterChainImpl.java" method="doFilter" class="weblogic.servlet.internal.FilterChainImpl" />
    <ns2:frame line="326" file="DMSServletFilter.java" method="doFilter" class="oracle.dms.wls.DMSServletFilter" />
    <ns2:frame line="56" file="FilterChainImpl.java" method="doFilter" class="weblogic.servlet.internal.FilterChainImpl" />
    <ns2:frame line="3592" file="WebAppServletContext.java" method="run" class="weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction" />
    <ns2:frame line="321" file="AuthenticatedSubject.java" method="doAs" class="weblogic.security.acl.internal.AuthenticatedSubject" />
    <ns2:frame line="121" file="SecurityManager.java" method="runAs" class="weblogic.security.service.SecurityManager" />
    <ns2:frame line="2202" file="WebAppServletContext.java" method="securedExecute" class="weblogic.servlet.internal.WebAppServletContext" />
    <ns2:frame line="2108" file="WebAppServletContext.java" method="execute" class="weblogic.servlet.internal.WebAppServletContext" />
    <ns2:frame line="1432" file="ServletRequestImpl.java" method="run" class="weblogic.servlet.internal.ServletRequestImpl" />
    <ns2:frame line="201" file="ExecuteThread.java" method="execute" class="weblogic.work.ExecuteThread" />
    <ns2:frame line="173" file="ExecuteThread.java" method="run" class="weblogic.work.ExecuteThread" />
    </ns2:stackTrace>
    </ns2:exception>
    </detail>
    </S:Fault>
    </S:Body>
    </S:Envelope>

    Hello AYVR
    I found your post because I want to suppress the stack trace in my response of the web service. I put the -Dcom.sun.xml.ws.fault.SOAPFaultBuilder.disableCaptureStackTrace=false parameter in the setDomainEnv.cmd in the bin directory of my domain. Maybe this is also a solution for you.
    Cheers Chris
    Edited by: user8989253 on Aug 5, 2011 6:36 AM

  • JAX-RPC And Non-Java Web Service

    Hi,
    This is a total shot in the dark. I'm attempting to consume an RPC web service developed in Delphi. I've created a JAX-RPC client in NetBeans from the published WSDL, attached below. I've created calls to several of the procedures available. What's bizarre, at least to me, is that half of them work fine and half of them don't. In all cases where they don't I'm getting a returns SOAP envelope indicated an access violation, attached below. There are no errors in any of the server logs and the developer assures me that the procedures do, in fact, work from his client (also developed conveniently enough in Delphi).
    I'm willing to take him at face value for the moment and assume that the problem is in my client implementation, although I have no idea where it would lie. The only difference I've been able to gather between the features which work and those that don't is the size of the return package...it would most likely be much larger than the ones that don't work.
    The service is an ISAPI dll running under IIS on Windows Server 2003. Any clues or guidance anyone would be willing to provide would be most welcome. On to the files:
    There wasn't enough room to post the entire thing so I've included one working (CheckStock) and non-working (GetLibTrace) function.
    WSDL:
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="IInnovaServiceservice" targetNamespace="http://tempuri.org/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/">
      <message name="CheckStock2Request">
        <part name="OPC" type="xs:string"/>
      </message>
      <message name="CheckStock2Response">
        <part name="QTY" type="xs:int"/>
        <part name="messages" type="xs:string"/>
        <part name="return" type="xs:int"/>
      </message>
      <message name="GetLibTrace5Request">
        <part name="LibName" type="xs:string"/>
      </message>
      <message name="GetLibTrace5Response">
        <part name="dimensions" type="xs:string"/>
        <part name="messages" type="xs:string"/>
        <part name="return" type="xs:int"/>
      </message>
      <portType name="IInnovaService">
        <operation name="CheckStock">
          <input message="tns:CheckStock2Request"/>
          <output message="tns:CheckStock2Response"/>
        </operation>
        <operation name="GetLibTrace">
          <input message="tns:GetLibTrace5Request"/>
          <output message="tns:GetLibTrace5Response"/>
        </operation>
      </portType>
      <binding name="IInnovaServicebinding" type="tns:IInnovaService">
        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="CheckStock">
          <soap:operation soapAction="urn:InnovaServiceIntf-IInnovaService#CheckStock" style="rpc"/>
          <input>
            <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:InnovaServiceIntf-IInnovaService"/>
          </input>
          <output>
            <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:InnovaServiceIntf-IInnovaService"/>
          </output>
        </operation>
        <operation name="GetLibTrace">
          <soap:operation soapAction="urn:InnovaServiceIntf-IInnovaService#GetLibTrace" style="rpc"/>
          <input>
            <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:InnovaServiceIntf-IInnovaService"/>
          </input>
          <output>
            <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:InnovaServiceIntf-IInnovaService"/>
          </output>
        </operation>
      </binding>
      <service name="IInnovaServiceservice">
        <port name="IInnovaServicePort" binding="tns:IInnovaServicebinding">
          <soap:address location="http://172.20.10.145:8080/innovaservice.dll/soap/IInnovaService"/>
        </port>
      </service>
    </definitions>My client:
    package com.signet.innova.client;
    import com.signet.innova.client.interfaces.IInnovaService;
    import com.signet.innova.client.interfaces.IInnovaServiceservice_Impl;
    import java.net.URL;
    import java.rmi.RemoteException;
    import java.util.ArrayList;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.Stub;
    import javax.xml.rpc.holders.Holder;
    import javax.xml.rpc.holders.IntHolder;
    import javax.xml.rpc.holders.StringHolder;
    import javax.xml.soap.MessageFactory;
    import javax.xml.soap.SOAPMessage;
    import javax.xml.ws.Dispatch;
    import javax.xml.ws.Service;
    public class InnovaClient {
        private void testConnection() {
            Stub stub = createProxy();
            IInnovaService service = (IInnovaService) stub;
            StringHolder sh1 = new StringHolder();
            StringHolder sh2 = new StringHolder();
            StringHolder sh3 = new StringHolder();
            IntHolder ih1 = new IntHolder();
            IntHolder ih2 = new IntHolder();
            IntHolder ih3 = new IntHolder();
            try {
                System.out.println("Calling checkStock()");
                service.checkStock("0103877866", ih1, sh1, ih2);
                System.out.println(" service returned => " + ih1.value + ":" + sh1.value + ":" + ih2.value);
            } catch (RemoteException re) {
                System.out.println(" service returned => " + re.toString());
            try {
                System.out.println("Calling getLibTrace()");
                service.getLibTrace("REGULAR", sh1, sh2, ih3);
                System.out.println(" service returned => " + sh1.value + ":" + sh2.value + ":" + ih1.value);
            } catch (RemoteException re) {
                System.out.println(" service returned => " + re.toString());
        private Stub createProxy() {
            return (Stub) (new IInnovaServiceservice_Impl().getIInnovaServicePort());
        public static void main(String[] args) {
            InnovaClient client = new InnovaClient();
            System.out.print("Running testConnection()...");
            client.testConnection();
    }The request and response packets are in my reply below. Ran out of characters. :o)
    Edited by: Pablo_Vadear on Dec 22, 2009 11:19 PM

    Correction from above...".it would most likely be much larger than the ones that don't work" should have been "it would most likely be much larger IN THE ONES THAT DON'T WORK". Sorry.
    The request:
    POST /innovaservice.dll/soap/IInnovaService HTTP/1.1
    Content-Type: text/xml; charset=utf-8
    Accept: text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
    Content-Length: 484
    SOAPAction: "urn:InnovaServiceIntf-IInnovaService#CheckStock"
    User-Agent: Java/1.6.0_17
    Host: 172.20.10.145:8080
    Connection: keep-alive
    <?xml version="1.0" encoding="UTF-8"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="urn:InnovaServiceIntf-IInnovaService" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><env:Body><ns0:CheckStock><OPC xsi:type="xsd:string">0103877866</OPC></ns0:CheckStock></env:Body></env:Envelope>POST /innovaservice.dll/soap/IInnovaService HTTP/1.1
    Content-Type: text/xml; charset=utf-8
    Accept: text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
    Content-Length: 491
    SOAPAction: "urn:InnovaServiceIntf-IInnovaService#GetLibTrace"
    User-Agent: Java/1.6.0_17
    Host: localhost:8080
    Connection: keep-alive
    <?xml version="1.0" encoding="UTF-8"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="urn:InnovaServiceIntf-IInnovaService" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><env:Body><ns0:GetLibTrace><LibName xsi:type="xsd:string">REGULAR</LibName></ns0:GetLibTrace></env:Body></env:Envelope>And the response:
    <?xml version="1.0"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><NS1:CheckStockResponse xmlns:NS1="urn:InnovaServiceIntf-IInnovaService"><return xsi:type="xsd:int">0</return><QTY xsi:type="xsd:int">0</QTY><messages xsi:type="xsd:string">Item 0103877866 retrieved OK.
    Right side OPC.
    </messages></NS1:CheckStockResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
    HTTP/1.1 200 OK
    Date: Tue, 22 Dec 2009 23:18:40 GMT
    Server: Microsoft-IIS/6.0
    Content-Type: text/xml
    Content-Length: 486
    <?xml version="1.0"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultactor/><faultcode>SOAP-ENV:Server</faultcode><faultstring>Access violation at address 00000000. Write of address 00000000</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>Any help appreciated.
    Edited by: Pablo_Vadear on Dec 22, 2009 11:23 PM

  • Weblogic 10.3 - Arrays and JAX-RPC Web Services

    We are currently looking at migrating from WL 8.1 to WL 10.3, and have an issue with some of our web services (JAX-RPC) with regards to returning String arrays.
    We have a web service method that returns a response object. This response object has many properties that includes a property that is a String array. So the code looks something like this (this is a simplified version):
    <em>public class OurService
    @RemoteMethod
    @WebMethod
    @WebResult(name = "result")
    public ResponseObject lookup(String someParam)
    // build the object and its properties here...
    return responseObject;
    }</em>
    This is what the response object looks like:
    <em>public class ResponseObject
    private String[] someProperty;
    public String[] getSomeProperty()
    return this.</em><em>someProperty</em><em>;
    public void setSomeProperty(String[] </em><em>someProperty</em><em>)
    this.</em><em>someProperty</em><em>= </em><em>someProperty</em><em>;
    }</em>
    So the issue is this. In WL 8.1, the web service generator would recognise the fact that the response object had a property that was a String array and would declare as such in the WSDL file, for example:
    <em><strong> &lt;xsd:element xmlns:tp="java:language_builtins.lang" type="<font color="#ff0000">tp:ArrayOfString</font>" name="someProperty" minOccurs="1" nillable="true" maxOccurs="1"&gt;
    &lt;/xsd:element&gt;
    </strong></em>
    As a result, when the service is called, the property is returned in the SOAP response like this:
    <strong>.
    </strong>
    <div class="e">
    <div class="c" style="margin-left: 1em; text-indent: -2em">
    <em><strong> <span class="m">&lt;</span><span class="t">someProperty</span><span class="t"> soapenc:arrayType</span><span class="m">="</span></strong><strong>xsd:string[2]<span class="m">"</span><span class="m">&gt;</span></strong></em>
    </div>
    <div>
    <div class="e">
    <div>
    <em><strong><span class="b"> </span><span class="m">&lt;</span><span class="t">string</span><span class="t">
    xsi:type</span><span class="m">="</span></strong><strong>xsd:string<span class="m">"</span><span class="m">&gt;</span><span class="tx">string1</span><span class="m">&lt;/</span><span class="t">string</span><span class="b">&gt;
    &lt;string xsi:type="xsd:string"&gt;string2&lt;/string&gt;
    </span><span class="m">&lt;/</span><span class="t">someProperty</span><span class="m">&gt;</span></strong></em>
    </div>
    </div>
    </div>
    </div>
    <strong>.
    </strong>
    But, in WL 10.3, the WSDL entry is:
    <em><strong> &lt;xs:element maxOccurs="unbounded" minOccurs="0" name="InstepCodes" nillable="true" type="xs:string"&gt;
    </strong></em>
    As a result the property is returned in the SOAP response like this:
    <strong> .
    </strong><strong><span class="m"> &lt;</span><span class="t">java:InstepCodes</span><span class="ns">
    xmlns:java</span><span class="m">="</span></strong><strong class="ns">java:com.myservice</strong><strong><span class="m">"</span><span class="m">&gt;</span><span class="tx">string1</span><span class="m">&lt;/</span><span class="t">java:InstepCodes</span><span class="m">&gt;</span>
    </strong><strong><span class="m"> &lt;</span><span class="t">java:InstepCodes</span><span class="ns">
    xmlns:java</span><span class="m">="</span></strong><strong class="ns">java:com.myservice</strong><strong><span class="m">"</span><span class="m">&gt;</span><span class="tx">string2</span><span class="m">&lt;/</span><span class="t">java:InstepCodes</span><span class="m">&gt;</span>
    </strong>The difference here is that WL 10.3 does not return the array of strings as a complex array type, just as a set of repeated elements.
    We need to return the array as we do for WL 8 in WL 10.3, because we have external clients that are parsing the response and looking for the XML in this format. We are not currently in a position to ask them to change.
    Is this a limitation of the JAX-RPC spec, or WL's implementation of it?
    If the service was to return a String array directly from a service method, then it is declared in the WSDL file.
    However, if a service returns an object that within itself has a property that is an array, it does not recognise it like it did with WL 8.1.
    <strong>
    </strong>
    <div class="e">
    </div>

    Thank you for the reply.
    We are using WL Server 8.1 (not Workshop), and moving to WL Server 10g R3.
    We are using the JWSC task to generate the service, which is:
    bq. weblogic.wsee.tools.anttasks.JwscTask+
    Here is an extract from the Ant build file the calls the task.
    &lt;jwsc
    srcdir="src/com/ourservice"
    sourcepath="src"
    destdir="${ear.dir}"
    verbose="false"
    debug="true"
    keepGenerated="true"
    classpathref="ws.class.path"&gt;
    +&lt;module name="${service.name}" explode="true"&gt;+
    +&lt;jws file="OurService.java" type="JAXRPC"/&gt;+
    +&lt;/module&gt;+
    +&lt;/jwsc&gt;+
    As stated in my first post, the service method returns an reponse object and its this that contains the array property. The service method itself does not return an array type. This seems to be the root of the problem, i.e. the declaration of array types is not being propagated down through the object graph the service method returns. Below is the code for the service and the response object.
    @FileGeneration(remoteClass = Constants.Bool.TRUE, remoteClassName = "OurService", localHome = Constants.Bool.TRUE, localHomeName = "OurServiceLocalHome", remoteHome = Constants.Bool.TRUE, remoteHomeName = "++OurService++Home", localClass = Constants.Bool.TRUE, localClassName = "++OurService++Local")+
    @JndiName(remote = "com.ourservice.++OurService++", local = "com.ourservice.++OurService++Local")+
    @Session(ejbName = "++OurService++", type = Session.SessionType.STATELESS, transactionType = Session.SessionTransactionType.CONTAINER, maxBeansInFreePool = "100", initialBeansInFreePool = "20", enableCallByReference = Constants.Bool.TRUE, homeIsClusterable = Constants.Bool.TRUE, homeLoadAlgorithm = Constants.HomeLoadAlgorithm.ROUND_ROBIN, isClusterable = Constants.Bool.TRUE, beanLoadAlgorithm = "RoundRobin", defaultTransaction = Constants.TransactionAttribute.SUPPORTS)+
    +@RoleMappings( { @RoleMapping(roleName = "Admin", externallyDefined = Constants.Bool.TRUE),+
    +@RoleMapping(roleName = "Monitor", externallyDefined = Constants.Bool.TRUE),+
    +@RoleMapping(roleName = "JMS", externallyDefined = Constants.Bool.TRUE) })+
    @WebService(name = "OurServicePort", serviceName = "OurService", targetNamespace = "http://www.ourservice.com/SOA/OurService+_service")+
    +@SOAPBinding(style = SOAPBinding.Style.RPC, use = SOAPBinding.Use.LITERAL)+
    @WLHttpTransport(contextPath = "OurService", serviceUri = "OurService", portName = "
    *OurService+Port")+
    public class OurService
    +{+
    @RemoteMethod
    @WebMethod
    @WebResult(name = "result")
    {color:#ff0000}public ResponseObject lookup(String someParam){color}
    // build the response object...
    return {color:#ff0000}responseObject{color};
    +}+
    This is what the response object looks like:
    public class ResponseObject
    +{+
    private String[] someProperty;
    +public {color:#ff0000}String[] getSomeProperty(){color}+
    +{+
    return this.someProperty;
    +}+
    public void setSomeProperty(String[] someProperty)
    +{+
    this.someProperty = someProperty;
    +}+
    +}+
    From all of this I cant tell how we get the WSDL file to delcare it as an array type, as shown in the JAX-RPC 1.1 spec you mentioned, based on the code we have and the JWSC build task we are using.
    (I appologise for the formatting of this message. It seems to want to insert + everywhere in the code examples, despite me removing them!)
    Edited by: user8013492 on 11-Dec-2008 02:09
    Edited by: user8013492 on 11-Dec-2008 02:11

Maybe you are looking for