WebLogic Literal encoding woes

Hi
I am trying to send a XML fragment to an Apache based web service
from a WL 6.1 client using Literal encoding.
Basically, I create a WebServiceProxy object, setup the
LiteralEncoder, add the method with the appropriate signature
and then invoke the method.
I'm passing a org.w3c.dom.Element object as the argument to the
method. And expecting that the WL SOAP library will encode it
in XML literal format.
However, it looks like the SoapEncoder is invoked, which then
attempts to serialize the org.w3c.dom.Element object using
SOAP encoding ... and fails.
Any ideas ?
-john

My (obvious!) follow-on question would be:
How do I do document style - say, I get the XML out of a file
and want to transmit that as the content of the SOAP <Body>
element.
Document and RPC style are actually more of a phenomena of WSDL. For SOAP, it
(document style) just means that "the argument for the method" is to be considered
an XML document, not a data typed "argument for the method".
You are not using WSDL, but if you were, you'd find out that WLS 6.1's WSDL processor
doesn't handle the following extract from a WSDL:
     <binding name="HertzReserveBinding" type="defs:HertzReservePortType">
          <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
          <operation name="exec">
               <soap:operation soapAction="http://oreilly.jaws.book/chapter03/HertzReserve"/>
               <input>
               <soap:body use="literal" namespace="urn:HertzReserveService"/>
          </input>
          <output>
               <soap:body use="literal" namespace="urn:HertzReserveService"/>
          </output>
          </operation>
     </binding>
It completely ignores the:
<soap:binding style="document"
And will throw an exception because it currently can't handle
<soap:body> elements that don't have an encodingStyle attribute. Just so you know
;-) I don't think this requirement that encodingStyle attribute is in the WSDL
spec, but I could be wrong.
As a general aside: there isn't much of a difference between
'RPC-literal' style and 'document' style, right ? Is there
some subtle, but key difference that I'm missing ?I'd say no. From a WLS 6.1 perspective, the difference between an RPC-style and
Message-style Web Service, is that the "service implementation" for an RPC-style
WS has a Stateless Session Bean as the entry point. Whereas the "service implementation"
for a Message-style Web Service, is a JMS destination (i.e. a Topic or Queue).
You will no doubt hear a lot of folks (including BEA's documentation) linking
Message-style Web Services to Message-Driven EJBs, but there is no requirement
that you use this J2EE component (the MDB) to pull things off the JMS destination!
Anything that implements javax.jms.MessageListener can be used.
I am a BEA employee, by the way. I'm a solution architect and a Web Services
"guru" for them. I know a lot about the WLS 6.1 WebLogic Web Services, because
I've been helping a lot of "internal" and external consultants and SEs with implementation
issues and training.
Regards,
Mike Wooten
"john mani" <[email protected]> wrote:
>
>
BTW:
The reason you are getting the <XML> element as the parent element of
the <Measurement>
element, is because you have specified that as the "name of the parameter"
you
are passing to notification ;-) Remember, you are still making and RPC-style
call
(i.e. uses method arguments as opposed to a document), even though you
are using
the literal XML encoding style. The root of the org.w3c.dom.Elementobject
(which
is <Measurement>, in this case), will be the value assigned to thatparameter
name, not the parameter name itself ;-) Do you see how that works?Ah, I think so :)
My (obvious!) follow-on question would be:
How do I do document style - say, I get the XML out of a file
and want to transmit that as the content of the SOAP <Body>
element.
As a general aside: there isn't much of a difference between
'RPC-literal' style and 'document' style, right ? Is there
some subtle, but key difference that I'm missing ?
thanx
-john
Happy Hacking,
Mike Wooten
"john mani" <[email protected]> wrote:
Thanks Michael.
Almost there :)
I can get my WL 6.1 SOAP client to send the message using
the apache-liternal encoding. However the actual XML fragment
is sent within a <XML> tag. i.e., the SOAP message sent out by
my WL SOAP client looks like this: (edited for brevity ..)
<SOAP-ENV:Body>
<ns0:notification SOAP-ENV:encodingStype=
'http://xml.apache.org/xml-soap/literalxml'>
<ns0:XML>
<Measurement>
<variable>my_var</variable>
<value>100.00</value>
</Measurement>
</ns0:XML>
</ns0:notification>
</SOAP-ENV:Body>
My XML fragment is within the <Measurement> tag. However its
being sent within a <XML> wrapper.
I was expecting the <Measurement> element to be directly
enclosed within the <notification> element.
I guess WL puts it like this because I am passing an
org.w3c.Element object to the method ... but, any way I
can get my desired effect ?
thanx
-john
"Michael Wooten" <[email protected]> wrote:
Hi John,
The more I thought about it, the more I figured you would want to
know
how I created
a client.jar, that contained all the classes to do the "client-side"
of literalxml
encoding, without having to have weblogic.jar in your class path.Long
sentence,
huh?
Anyway, here are the names (and paths) of the 24 classes that you'll
need to put
in one of your client.jar:
weblogic/soap/codec/LiteralCodec.class
weblogic/apache/xml/serialize/BaseMarkupSerializer.class
weblogic/apache/xml/serialize/DOMSerializer.class
weblogic/apache/xml/serialize/ElementState.class
weblogic/apache/xml/serialize/EncodingInfo.class
weblogic/apache/xml/serialize/Encodings.class
weblogic/apache/xml/serialize/HTMLdtd.class
weblogic/apache/xml/serialize/HTMLSerializer.class
weblogic/apache/xml/serialize/IndentPrinter.class
weblogic/apache/xml/serialize/LineSeparator.class
weblogic/apache/xml/serialize/Method.class
weblogic/apache/xml/serialize/OutputFormat$Defaults.class
weblogic/apache/xml/serialize/OutputFormat$DTD.class
weblogic/apache/xml/serialize/OutputFormat.class
weblogic/apache/xml/serialize/Printer.class
weblogic/apache/xml/serialize/Serializer.class
weblogic/apache/xml/serialize/SerializerFactory.class
weblogic/apache/xml/serialize/SerializerFactoryImpl.class
weblogic/apache/xml/serialize/SieveEncodingInfo$BAOutputStream.class
weblogic/apache/xml/serialize/SieveEncodingInfo.class
weblogic/apache/xml/serialize/TextSerializer.class
weblogic/apache/xml/serialize/XHTMLSerializer.class
weblogic/apache/xml/serialize/XMLSerializer.class
weblogicx/xml/stream/helpers/DOMBuilder.class
This could, of course, all change with the next release of WLS, souse
this information
at your own peril ;-)
Where do you get them from? I think you know that already. How do
you
get the
wsgen Ant Task to do it for you, so you don't have to? Ah, ha... Now
that's what
I'm talkin' about ;-) Send me an e-mail at [email protected],
and I'll
tell you.
Regards,
Mike Wooten
"john mani" <[email protected]> wrote:
Hi Michael
Hi John,
There are ways to use the WLS 6.1's Web Services stack, that don't
require
the
use of a WSDL, but they involve a little more of a "roll up your
sleeves"
attitude,
on the part of the developer ;-)Yes, there is no WSDL. I am invoking a webservice that's generated
and deployed in Apache, and as far as I know, Apache SOAP doesn't
provide facilities to generate WSDL for its web services.
Basically, I use the Apache SOAP tools to automatically generate
and deploy the SOAP wrappers for my Java classes, but this
process does not generate any WSDL.
I guess one option is to handcraft a WSDL. And the other option
would be to "roll up the sleeves" and use the WebLogic client
libs in a manner that doesn't require WSDL.
In fact, I am accessing a Apache SOAP RPC style webclient using
the WebLogic 6.1 libraries in a similar manner (i.e., no WSDL).
That was pretty straightforward, hence my surprise when it
didn't work in a literal style.
My code for the RPC style looks like this:
WebServiceProxy proxy = WebServiceProxy.createService(
"telemetry", "urn:telemetry",
new URL(apache_service_url));
proxy.setCodecFactory(factory);
SoapType arg = new SoapType("Measurement", Measurement.class);
proxy.addMethod("notification", null, new SoapType[]{arg});
SoapMethod method = proxy.getMethod("notification");
method.setObjectUrl("urn:telreceiver");
Measurement m = new Measurement(..... );
Object result = method.invoke(new Object[] { m } );
My code for the literal style looks quite similar, except
that I use a org.w3c.dom.Element class instead of the
Measurement class (which is a JavaBean). And I invoke the
target method with the Element class as arg.
Your advice ?
thanks
-john
Regards,
Mike Wooten
"john mani" <[email protected]> wrote:
Hi
I am trying to send a XML fragment to an Apache based web service
from a WL 6.1 client using Literal encoding.
Basically, I create a WebServiceProxy object, setup the
LiteralEncoder, add the method with the appropriate signature
and then invoke the method.
I'm passing a org.w3c.dom.Element object as the argument to the
method. And expecting that the WL SOAP library will encode it
in XML literal format.
However, it looks like the SoapEncoder is invoked, which then
attempts to serialize the org.w3c.dom.Element object using
SOAP encoding ... and fails.
Any ideas ?
-john

Similar Messages

  • Problem invoking weservice of SOAP Document style with literal encoding in

    I have a webservice with Document type and with literal encoding which is deployed in weblogic. This webservice has got two methods both with no argument. If I try to invoke using weblogic interface for testing the webservice, only one method is able to invoke.The other method gives invokation error.The Soap request which is going is to this webservice is with empty body.
    the request looks like this
    <!--REQUEST.................-->
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <env:Body>
    </env:Body>
    </env:Envelope>
    If I am changing one method signatuer in such a way that it has one argument then both methods are able to invoke.
    While I am using SAAJ api If I am trying to give the method name in the SOAP request it gives error.
    Can anybody help on this.
    tech gent

    I have realised I was using saaj 1.1 (from jwsdp 1.3) and so have updated to use 1.2 now. But the problem is still there. Should saaj 1.2 support literal encoding? I got the impression from it saying it includes "support for ws-i".

  • What's the available value for weblogic.jsp.encoding in web application.

    Hi,
              I'm using chinese windows nt 4.0 and weblogic 5.1 sp6.When I did not set
              weblogic.jsp.encoding to GB2312 , when the jsp file contain's chinese , the
              output will be error .And when I did not set it , the output is correct, but
              when I use request.getParameter("SomeFormElement")(the element inputed
              chinese), the return value is error.
              How should I set weblogic.jsp.encoding value to satisfy all this problem?
              When I set the value to ISO-8859, there is an exception:
              java.io.UnsupportedEncodingException: Charset: 'ISO-8859' not recognized,
              and there is no alias for it in the weblogic.httpd.charsets property. So
              What's the available value for weblogic.jsp.encoding in web application?
              Pan
              

    hi ,
    i think the best way is to create java beans ,in that bean call your EJB ,
    and check the validation over there.
    and make that bean scope to session.
    in each and everypage try to check the session ,if it is not valid then forward to your login page...
    otherwise continue to give access to him like guest
    Regards,
    AfTaB

  • Ebservice with SOAP DOCUMENT/Literal encoding, method with out arguments

    The webservice deployed as a DOCUMENT/literal encoding,If the method in the webservice is not havng any arument then is there any proplem while invoking. ?

    Hi Dragana,
    We definitely support the ability to call a web service that exposes two operations (document/literal or not).
    Glancing through your WSDL, it looks good.
    Could you please try to tunnel the second request and see 1) what data is sent to the service and 2) what data is returned by the service?
    Can you please email us a reproduceable case so that we can help troubleshoot in parallel?
    Thank you,
    Edwin
    [email protected]
    please rename .zip to .zap

  • Issue with Weblogic character encoding

    I have struts2 based web application which works fine with tomcat server but when i deployed the application to weblogic 10.3 server it is creating following issue-
    1) when i enter data in application forms with £ (pound sign), £ gets converted to ?
    My Jsp Page is using ISO-8859-1 charset. please look at the snapshot from jsp page.
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    I have debug the application and came to know that this data (£ sign) is converted to ? before being assigned to corresponding property in action class.
    this seems to be issue with encoding of characters with weblogic server.
    I have also tried to fix this issue by defining the charset in weblogic.xml file in my application as follows but it does'nt solve this issue. please see the snapshot from weblogic.xml file.
    <wls:weblogic-version>10.3</wls:weblogic-version>
    <wls:context-root>APMApplication</wls:context-root>
    <wls:charset-params>
    <wls:input-charset>
    <wls:resource-path>/*</wls:resource-path>
    <wls:java-charset-name>ISO-8859-1</wls:java-charset-name>
    </wls:input-charset>
    </wls:charset-params>
    Please suggest some solution to fix this issue. thanking you in advance.

    "I can not change the charset in jsp pages i.e i have to use ISO-8859-1 in my jsp page which is a must have requirment."
    You are right here as the pound sign is not included in UTF-8 (did not know that sorry).
    Could you try setting the page directive of the JSP to
    <%@ page contentType="text/html;charset=ISO-8859-1" language="java" %>or when you are working with jspx
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns="http://www.w3.org/1999/xhtml" version="2.0">
        <jsp:directive.page contentType="text/html;charset=ISO-8859-1"/>
    </jsp:root>

  • Literal encoding

    Codec problems
    I am having diffculy with the the following code Any suggestions would be appreciated
    Properties h = new Properties();
    h.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.soap.http.SoapInitialContextFactory");
    h.put("weblogic.soap.verbose", "true" );
    CodecFactory factory = CodecFactory.newInstance();
    factory.register(new weblogic.soap.codec.LiteralCodec());
    Context context = new InitialContext(h);
    WebServiceProxy proxy = (WebServiceProxy)context.lookup(url +
         "/test/ejb20-statelessSession-TraderHome/ejb20-statelessSession-TraderHome.wsdl"
    SoapMethod method = proxy.getMethod("testxml");
    System.out.println(method.invoke(new Object[]{}));
    I get the following exception on the lookup :
    Exception in thread "main" javax.naming.NamingException: i/o failed java.io.IOEx
    ception: http://xml.apache.org/xml-soap/literalxml/:http://www.w3.org/1999/XMLSc
    hema:string:No codec for decoding http://xml.apache.org/xml-soap/literalxml/:
    CodecFactory: http://schemas.xmlsoap.org/soap/encoding/=null, =null]. Root exce
    ption is java.io.IOException: http://xml.apache.org/xml-soap/literalxml/:http://
    www.w3.org/1999/XMLSchema:string:No codec for decoding http://xml.apache.org/xml
    -soap/literalxml/: [ CodecFactory: http://schemas.xmlsoap.org/soap/encoding/=nul
    l, =null]
    at weblogic.soap.wsdl.binding.Part.typeToClass(Part.java:74)
    at weblogic.soap.wsdl.binding.Part.toSoapType(Part.java:51)
    at weblogic.soap.wsdl.binding.Message.getReturnType(Message.java:58)
    at weblogic.soap.wsdl.binding.BindingOperation.populate(BindingOperation
    .java:52)
    at weblogic.soap.wsdl.binding.Binding.populate(Binding.java:48)
    at weblogic.soap.wsdl.binding.Definition.populate(Definition.java:116)
    at weblogic.soap.WebServiceProxy.getServiceAt(WebServiceProxy.java:176)
    at weblogic.soap.http.SoapContext.lookup(SoapContext.java:76)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    at examples.webservices.rpc.javaClient.Client.main(Client.java:47)

    Codec problems
    I am having diffculy with the the following code Any suggestions would be appreciated
    Properties h = new Properties();
    h.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.soap.http.SoapInitialContextFactory");
    h.put("weblogic.soap.verbose", "true" );
    CodecFactory factory = CodecFactory.newInstance();
    factory.register(new weblogic.soap.codec.LiteralCodec());
    Context context = new InitialContext(h);
    WebServiceProxy proxy = (WebServiceProxy)context.lookup(url +
         "/test/ejb20-statelessSession-TraderHome/ejb20-statelessSession-TraderHome.wsdl"
    SoapMethod method = proxy.getMethod("testxml");
    System.out.println(method.invoke(new Object[]{}));
    I get the following exception on the lookup :
    Exception in thread "main" javax.naming.NamingException: i/o failed java.io.IOEx
    ception: http://xml.apache.org/xml-soap/literalxml/:http://www.w3.org/1999/XMLSc
    hema:string:No codec for decoding http://xml.apache.org/xml-soap/literalxml/:
    CodecFactory: http://schemas.xmlsoap.org/soap/encoding/=null, =null]. Root exce
    ption is java.io.IOException: http://xml.apache.org/xml-soap/literalxml/:http://
    www.w3.org/1999/XMLSchema:string:No codec for decoding http://xml.apache.org/xml
    -soap/literalxml/: [ CodecFactory: http://schemas.xmlsoap.org/soap/encoding/=nul
    l, =null]
    at weblogic.soap.wsdl.binding.Part.typeToClass(Part.java:74)
    at weblogic.soap.wsdl.binding.Part.toSoapType(Part.java:51)
    at weblogic.soap.wsdl.binding.Message.getReturnType(Message.java:58)
    at weblogic.soap.wsdl.binding.BindingOperation.populate(BindingOperation
    .java:52)
    at weblogic.soap.wsdl.binding.Binding.populate(Binding.java:48)
    at weblogic.soap.wsdl.binding.Definition.populate(Definition.java:116)
    at weblogic.soap.WebServiceProxy.getServiceAt(WebServiceProxy.java:176)
    at weblogic.soap.http.SoapContext.lookup(SoapContext.java:76)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    at examples.webservices.rpc.javaClient.Client.main(Client.java:47)

  • Media Encoder woes

    Ok - hopefully i will have time to post a much more indepth overview of my problem - but in a nutshell - media encoder is destroying my export.
    I have the latest update (4.1.0) running a PC with Vista 64 12gigs ram dual quads - but I am also getting the same problems on my dual quad MAC.
    I saved the sequence on our server and another editor at another office is having same issues.
    One example - I am using a dynamic link to AE for some text with a glow added. Back inside premiere - it looks correct.  I render an uncompressed file (avi on PC mov on mac) and glow is gone.
    I place that sequence inside of another (nest it) and export via ME.  Glow is now there, but it is extremely pixelated - as in totally unusable.
    Same results exporting H264. I even tried animation codec on the Mac, but to no avail.
    I think Media Encoder is causing these problems because i can see the glow back inside of Premiere - and it looks correct in the preview window.
    Is there any other way to export?  I have tried to open the project in AE and render there - but there are a few items that wont translate and re-creating all of those in AE just to render there would be a nightmare.
    Anyone else having these issues?
    I will post screenies after the weekend with more detailed information.

    Predicated on info in the other THREAD, I will now ammend my previous post:
    2.) Assets - that's why I asked
    3.) Project - could still be a possibility
    Looks like the Bug is still in the running and gaining fast.
    Have you filed a Bug Report/Feature Request with the data that you've furnished in your two thread?
    Good luck,
    Hunt

  • Weblogic 7.0 and encoding styles

    All,
    Does anyone of you know if Weblogic 7.0 supports following two encoding
    styles?
    http://schemas.xmlsoap.org/soap/encoding/
    http://xml.apache.org/xml-soap/literalxml
    In the WLS 6.1 documentation, I see that the above two encoding styles
    are
    supported but not in 7.0!
    Your input to this...is greatly appretiated.
    Thanks,
    Sanjay

    Hi Sanjay,
    WLS 7.0 only supports the SOAP encoding described in section 5 of the SOAP 1.1
    spec. This is represented by the "http://schemas.xmlsoap.org/soap/encoding/" namespace.
    "Literal encoding" is actually an oxymoron, because why would you want to "encode
    something" that was intended to be "interpreted literally" :-)
    When you want to use "literalxml" with WLS 7.0, just add a style="document" attribute
    to the <service> element of the <servicegen> Ant task.
    Regards,
    Mike Wooten
    Sanjay Ungarala <[email protected]> wrote:
    All,
    Does anyone of you know if Weblogic 7.0 supports following two encoding
    styles?
    http://schemas.xmlsoap.org/soap/encoding/
    http://xml.apache.org/xml-soap/literalxml
    In the WLS 6.1 documentation, I see that the above two encoding styles
    are
    supported but not in 7.0!
    Your input to this...is greatly appretiated.
    Thanks,
    Sanjay

  • What is needed on non-weblogic client to make soap request

    Hi, I am trying to make a soap request from a client that is not weblogic to a
    weblogic6.1 server. I was under the impression that all I needed was the client.jar
    created by wsgen. But when I try to access the service through the client I get
    the below exception. It appears to be trying to access a weblogic class that is
    not contained in the client.jar. Does this mean I also need to include the weblogic.jar
    on the client(I'm hoping not to). Thanks
    java.lang.NoClassDefFoundError: weblogic/net/http/HttpsURLConnection
         at weblogic.soap.http.SoapContext.lookup(SoapContext.java:87)
         at javax.naming.InitialContext.lookup(InitialContext.java:350)
         at index_1._jspService(index_1.java:68)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
         at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
         at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
         at org.apache.tomcat.core.Handler.service(Handler.java:235)
         at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
         at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
         at java.lang.Thread.run(Thread.java:484)

    Hi Jane,
    Looks like you have run smack dab into one of the first "myths" about web services
    - "SOAP client software is not vendor- dependent" :-) This is in fact, exactly
    the opposite! And it's not just WebLogic's SOAP client API that has this "vendor-dependent"
    code. Apache SOAP, Apache AXIS, Systinet WASP, GLUE, etc. exhibit the same behavior.
    The difference is that WebLogic's client.jar, is not really a "standalone, SOAP
    client package". It's a "web service-specific" client package.
    JAX-RPC (and the other APIs in the Java Web Services Developer's Pack) is attempting
    to reduce a fair amount of this "vendor-dependency", but there will always be
    some :-) WLS 6.1 doesn't use JAX-RPC, so...
    Anyway, how many "vendor classes" you need, depends on what you are attempting
    to do in the client. If you are just consuming a web service that uses "SOAP encoding",
    then you'll need less. If you are consuming a web service that uses "literal encoding",
    you'll need more. An easy (albeit time consuming) way to figure out which classes
    you need from the weblogic.jar file, to use WebLogic's Web Service client package
    inside Tomcat, is to use the "-verbose:class" option, on the Java command used
    to start Tomcat. This will produce a lot of output, so I suggest you capture it
    to a log, instead of sending it to stdout :-) But, as I said, this is a very,
    very, very time consuming way to determine all the classes you need from the weblogic.jar
    file. Trust me, I've done this before and it took me about 3 hours to find every
    class that's needed! It's simpler just to include the weblogic.jar file in the
    CLASSPATH you start Tomcat with :-)
    Another option is to just use the Apache SOAP package to create the web service
    client. This works wonderfully, if you don't want to use WSDL (Apache SOAP doesn't
    support WSDL). If you want to use WSDL, go with the Apache AXIS package. It has
    an implementation of JAX-RPC, and is pretty close to the Web Services implementation
    in WLS 7.0 (which I'm assuming you'll eventually upgrade to anyway, right?).
    Regards,
    Mike Wooten
    "Jane" <[email protected]> wrote:
    >
    Hi, I am trying to make a soap request from a client that is not weblogic
    to a
    weblogic6.1 server. I was under the impression that all I needed was
    the client.jar
    created by wsgen. But when I try to access the service through the client
    I get
    the below exception. It appears to be trying to access a weblogic class
    that is
    not contained in the client.jar. Does this mean I also need to include
    the weblogic.jar
    on the client(I'm hoping not to). Thanks
    java.lang.NoClassDefFoundError: weblogic/net/http/HttpsURLConnection
         at weblogic.soap.http.SoapContext.lookup(SoapContext.java:87)
         at javax.naming.InitialContext.lookup(InitialContext.java:350)
         at index_1._jspService(index_1.java:68)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
         at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
         at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
         at org.apache.tomcat.core.Handler.service(Handler.java:235)
         at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
         at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
         at java.lang.Thread.run(Thread.java:484)

  • Problems invoking literal Web Services

    Hi all,
    I'm trying to invoke a document style web service.
    I've succesfully deployed a service using <soap:body use="literal" namespace="MyWebService1"/>
    as for all literal service i've declared it as
    public org.w3c.dom.Element MyService(org.w3c.dom.Element e){...
    in my WSDL i've changed message type from xsd:any or xsd:anyType to an element I've declared in the <types> section, cause BPEL do not accept these kind of types:
    <message name="MyServiceRequest">
    <part name="e" element="tns:MyElement"/>
    </message>
    i've called the service succesfully with a self-written client and then i've tried to invoke it throught a Bpel process... and it fail :(
    I've used a TCP monitor to compare XML envelopes and I've noticed a difference wich let BPEL invocation fail
    with my pure java client the mex produced is:
    <?xml version='1.0' encoding='UTF-8'?>
    <SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
    <ns1:docStyle xmlns:ns1="MyWebService1" SOAP-ENV:encodingStyle="http://xml.apache.org/xml-soap/literalxml">
    <elem>
    <numbers><number>11</number></numbers>
    </elem>
    </ns1:docStyle>
    </SOAP-ENV:Body>
    with BPEL call i get
    <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>
    <ns1:docStyle soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="MyWebService1">
    <numbers xmlns="http://prova/DocStyleService.wsdl">
    <number>45</number>
    </numbers>
    </ns1:docStyle>
    </soapenv:Body>
    </soapenv:Envelope>
    the problem is the encodingStyle one = http://schemas.xmlsoap.org/soap/encoding/
    the other = http://xml.apache.org/xml-soap/literalxml
    but i cannot figure how to change this, how to use the invoke activity to send in literal encoding style!!
    any ideas
    thank Lisa

    Hi Lisa,
    I am having very similar problem :) (RPC web service, but Element as parameter and literal encoding), so if you, or someone else knows the solution, please help...
    regards,
    Vlado

  • Unexpected encoding style

    Hi all. I'm new to Oracle and Web Services in general, so do pardon me in advance.
    I followed the example here: http://www.oracle.com/technology/obe/obe1013jdev/ws/wsandascontrol.htm and deployed the web service to the external OC4J server.
    Subsequently, I tried calling the web service using the OmniPortlet in OracleAS but it gives this error:
    Call to Web Service Failed. [env:Client : caught exception while handling request: unexpected encoding style: expected=, actual=http://xml.apache.org/xml-soap/literalxml]
    Any help is appreciated.

    Jose,
    When you work with Web Services, the common development flow is as follow:
    1) develop your service endpoint. You can start from JAVA code or PL/SQL package (bottom-up) or from a WSDL (top-down). In your case, you need to start from the Store Procedures.
    2) deploy your service endpoint. As the result of the deployment step, you will have a WSDL available on your application server, that advertise the service interface.
    3) generate the static client proxy from the WSDL (service contract).
    4) invoke the service using the proxy from step 3 or use dynamic invocation APIs to make direct call, without to use a static proxy.
    Bypassing step 3) usually requires a dipper understanding of SOAP linguana, so it's not the easiest way to get started.
    Based on the statement you made, it looks like you are starting from step 3)
    From the error message, it seams that you are trying to invoke a Web service that was deployed using 'literal' encoding (either document/literal or RPC/literal) with a client generated for RPC-encoded message format. In the JDeveloper Wizard, you have an option to change the message format to RPC/Encoded.
    Hope this helps,
    eric

  • DII unexpected encoding style with SharePoint Web Service

    I am trying to call a dynamic sharepoint web service in Java using DII (Dynamic Invocation Interface)
    but I kept getting error:unexpected encoding style: after the invoke expected=http://schemas.xmlsoap.org/soap/encoding/, actual=
    I am trying to call web service - GetWebCollection()
    String endPoint="http://%SPSERVER/_vti_bin/Webs.asmx";
    String nameSpaceUri = "xmlns:xsi";
    String serviceName = "Webs";
    String porttype="WebsSoap";
    String NS_XSD = "http://www.w3.org/2001/XMLSchema";
    ServiceFactory factory =
    ServiceFactory.newInstance();
    Service service =factory.createService(new QName(serviceName));
    QName qport = new QName(porttype);
    hpsharepoint.Webs webs = new hpsharepoint.Webs_Impl();
    Call call = (Call) webs.createCall(qport);
    call.setProperty(call.USERNAME_PROPERTY,kuser);
    call.setProperty(call.PASSWORD_PROPERTY,password);
    call.setProperty(Call.ENCODINGSTYLE_URI_PROPERTY, "http://schemas.xmlsoap.org/soap/encoding/");
    call.setProperty(Call.SOAPACTION_USE_PROPERTY,
    new Boolean(true));
    call.setProperty(Call.SOAPACTION_URI_PROPERTY,"http://schemas.microsoft.com/sharepoint/soap/GetWebCollection");
    call.setTargetEndpointAddress(endPoint);
    call.setOperationName(
    new QName(nameSpaceUri,"GetWebCollection"));
    String[] params = {};
    NodeList list=(NodeList)call.invoke(params);
    ==========================
    This is the soap 1.1
    ==========================
    POST /_vti_bin/Webs.asmx HTTP/1.1 Host: <server> Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://schemas.microsoft.com/sharepoint/soap/GetWebCollection" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <GetWebCollection xmlns="http://schemas.microsoft.com/sharepoint/soap/" /> </soap:Body> </soap:Envelope>

    Jose,
    When you work with Web Services, the common development flow is as follow:
    1) develop your service endpoint. You can start from JAVA code or PL/SQL package (bottom-up) or from a WSDL (top-down). In your case, you need to start from the Store Procedures.
    2) deploy your service endpoint. As the result of the deployment step, you will have a WSDL available on your application server, that advertise the service interface.
    3) generate the static client proxy from the WSDL (service contract).
    4) invoke the service using the proxy from step 3 or use dynamic invocation APIs to make direct call, without to use a static proxy.
    Bypassing step 3) usually requires a dipper understanding of SOAP linguana, so it's not the easiest way to get started.
    Based on the statement you made, it looks like you are starting from step 3)
    From the error message, it seams that you are trying to invoke a Web service that was deployed using 'literal' encoding (either document/literal or RPC/literal) with a client generated for RPC-encoded message format. In the JDeveloper Wizard, you have an option to change the message format to RPC/Encoded.
    Hope this helps,
    eric

  • Weblogic server with tuxedo \Q?

    hi all,
    i m going to access the TUXEDO8.0 \Q functionality with weblogic7.0. what should
    i do?
    if i make use of the WTC, can i pass double-byte character to the tuxedo?
    if not, what can i do? can i use jolt? or corba?
    sang

    sang wrote:
    hi all,
    i m going to access the TUXEDO8.0 \Q functionality with weblogic7.0. what should
    i do?Check the ApplicationMonitorInterface API documentation for the tpenqueue/tpdequeue
    methods. If you want to do something like Tuxedo queues to JMS queues, take a look
    at the WTC tBridge documentation.
    if i make use of the WTC, can i pass double-byte character to the tuxedo?
    if not, what can i do? can i use jolt? or corba?
    sangTuxedo8.0 does not handle double byte characters. For the ascii code set, this is
    not a problem and WTC and Jolt transfer strings correctly with Tuxedo 8.0.
    With non-ascii codesets there is a property(weblogic.wtc.encoding for WTC)
    which can be set. WTC will use this property's value as the code set name of the
    remote domains and convert to/from this. Note that all the remote domains
    in a WTCService configuration are assumed to be the same code set. If you
    need to have different codesets used simultaneously then you will need to
    have separate WTC services running. The codeset names that are accepted are
    ones that are supported by Java
    (see http://java.sun.com/j2se/1.3/docs/guide/intl/encoding.doc.html )
    Stay tuned, in Tuxedo 8.1 a new multi byte buffer type is being added and
    you will be able to do the code set conversions on the Tuxedo side.
    Bob Finan

  • HttpOnly Cookie in weblogic 10.0

    Hello,
    I use weblogic 10.0 version. when I enable cookie-http-only in weblogic.xml, in the output I can see that flag is not set. The documentation says that this flag is set to true by default.
    I do not know if there were any fixes made in the 10.X Service packs. Please advice if I there is an issue in the 10.0 version and I should upgrade my weblogic to 10.3?
    Thanks,
    Kalyan

    <Oct 4, 2010 5:11:27 PM IST> <Error> <J2EE> <BEA-160197> <Unable to load descriptor C:\Data\dev\adcxx5n_workstation_oct2010\vobmnt\ima\pmas\workstation\common.base-platform\target\base-platform-6.9-SNAPSHOT/WEB-INF/weblogic.xml of module null. The error is weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
    C:\Data\dev\adcxx5n_workstation_oct2010\vobmnt\ima\pmas\workstation\common.base-platform\target\base-platform-6.9-SNAPSHOT\WEB-INF\weblogic.xml:18:11:18:11: problem: cvc-complex-type.2.4a: Expected elements 'cookie-path@http://www.bea.com/ns/weblogic/90 cookie-domain@http://www.bea.com/ns/weblogic/90 cookie-comment@http://www.bea.com/ns/weblogic/90 cookie-secure@http://www.bea.com/ns/weblogic/90 cookie-max-age-secs@http://www.bea.com/ns/weblogic/90 persistent-store-type@http://www.bea.com/ns/weblogic/90 persistent-store-cookie-name@http://www.bea.com/ns/weblogic/90 persistent-store-dir@http://www.bea.com/ns/weblogic/90 persistent-store-pool@http://www.bea.com/ns/weblogic/90 persistent-store-table@http://www.bea.com/ns/weblogic/90 jdbc-column-name-max-inactive-interval@http://www.bea.com/ns/weblogic/90 jdbc-connection-timeout-secs@http://www.bea.com/ns/weblogic/90 url-rewriting-enabled@http://www.bea.com/ns/weblogic/90 http-proxy-caching-of-cookies@http://www.bea.com/ns/weblogic/90 encode-session-id-in-query-params@http://www.bea.com/ns/weblogic/90 monitoring-attribute-name@http://www.bea.com/ns/weblogic/90 sharing-enabled@http://www.bea.com/ns/weblogic/90' instead of 'cookie-http-only@http://www.bea.com/ns/weblogic/90' here in element session-descriptor@http://www.bea.com/ns/weblogic/90:<C:\Data\dev\adcxx5n_workstation_oct2010\vobmnt\ima\pmas\workstation\common.base-platform\target\base-platform-6.9-SNAPSHOT/WEB-INF/weblogic.xml:18:11>

  • Wls 6.1 and wrong document encoding

    Hi
    In weblogic 6.0 sp2 we use the following startup parameters for weblogic: -Dfile.encoding=ISO8859_1
    -Duser.region=SE -Duser.language=sv. We does this to make the swedish characters
    Å Ä and Ö work in .jsp pages.
    But in weblogic 6.1 sp1 it does not work. My å, ä and ö looks like an ?.
    Anyone know what to do ?
    best regards Anders Pettersson

    Anders,
    I have had the same problems with german characters.
    With the "Edit WebApplication Descriptor" I have set -encoding
    ISO8859_1 in the JSP Descriptor Section under Compile Flags and so You
    will have the swedish characters.
    György
    Pen Friend <[email protected]> wrote in message news:<[email protected]>...
    Anders,
    Could you please post this question in the weblogic.developer.interest.internationalization newsgroup.
    Anders Pettersson wrote:
    Hi
    In weblogic 6.0 sp2 we use the following startup parameters for weblogic: -Dfile.encoding=ISO8859_1
    -Duser.region=SE -Duser.language=sv. We does this to make the swedish characters
    Å Ä and Ö work in .jsp pages.
    But in weblogic 6.1 sp1 it does not work. My å, ä and ö looks like an ?.
    Anyone know what to do ?
    best regards Anders Pettersson

Maybe you are looking for