You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by dumdum 420 <du...@hotmail.com> on 2003/04/24 22:50:49 UTC

AXIS Client : need help WSDL2JAVA

I developed a AXIS webservice and made a client using the wsdl2java utility.

Now when I try to access my webservice using the generated code which is 
deployed on a remote machine within the same network it does not seem to 
work.

Then I figured out that the xxxxSoapBindingImpl.java seems to be at fault.

Kindly help so that I can smoothly invoke my webservice from a remote 
machine ...

Thanx in advance.

BP







_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail


Re: Attachment example errors. Difference between document/Literal and Attachments.

Posted by Kal Iyer <ka...@wingfoot.com>.
>>I don't see any type definition for the request.

Perhaps the echoElements operation does not need any request parameters (A
message may have zero parts).


----- Original Message -----
From: "Rajal Shah" <ra...@cisco.com>
To: <ax...@ws.apache.org>
Sent: Thursday, April 24, 2003 3:43 PM
Subject: RE: Attachment example errors. Difference between document/Literal
and Attachments.


> hmm.. Here is the WSDL definition for the MessageService sample
(doc/literal
> example). I don't see any type definition for the request. Much little
> attachments. SO what am I missing?
>
> --
> Rajal
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions
> targetNamespace="http://localhost:8080/axis/services/MessageSe
> rvice" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:wsdlsoap=
> "http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:apachesoap="http://xml.apache.org/
> xml-soap" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns1=""
> xmlns:intf="http://localhost:8080/axis/services/MessageService"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:impl="http://localhost:8080/axis/services/MessageServic
> e" xmlns="http://schemas.xmlsoap.org/wsdl/"><wsdl:types><schema
> xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace=""><import
> namespace="http://schemas.xmlsoap.org/soap/encoding/"/><element
> name="echoElementsReturn" type="xsd:anyType"
> /></schema></wsdl:types>
>   <wsdl:message name="echoElementsResponse">
>     <wsdl:part name="echoElementsReturn" element="echoElementsReturn"/>
>   </wsdl:message>
>   <wsdl:message name="echoElementsRequest">
>   </wsdl:message>
>   <wsdl:portType name="MessageService">
>     <wsdl:operation name="echoElements">
>       <wsdl:input name="echoElementsRequest"
> message="intf:echoElementsRequest"/
> >
>       <wsdl:output name="echoElementsResponse"
> message="intf:echoElementsRespons
> e"/>
>     </wsdl:operation>
>   </wsdl:portType>
>   <wsdl:binding name="MessageServiceSoapBinding"
type="intf:MessageService">
>     <wsdlsoap:binding style="document"
> transport="http://schemas.xmlsoap.org/soa
> p/http"/>
>     <wsdl:operation name="echoElements">
>       <wsdlsoap:operation soapAction=""/>
>       <wsdl:input name="echoElementsRequest">
>         <wsdlsoap:body use="literal"
> namespace="http://localhost:8080/axis/servi
> ces/MessageService"/>
>       </wsdl:input>
>       <wsdl:output name="echoElementsResponse">
>         <wsdlsoap:body use="literal"
> namespace="http://localhost:8080/axis/servi
> ces/MessageService"/>
>       </wsdl:output>
>     </wsdl:operation>
>   </wsdl:binding>
>   <wsdl:service name="MessageService">
>     <wsdl:port name="MessageService"
> binding="intf:MessageServiceSoapBinding">
>       <wsdlsoap:address
> location="http://localhost:8080/axis/services/MessageSer
> vice"/>
>     </wsdl:port>
>   </wsdl:service>
> </wsdl:definitions>
>
> -----Original Message-----
> From: Anne Thomas Manes [mailto:anne@manes.net]
> Sent: Thursday, April 24, 2003 3:15 PM
> To: axis-user@ws.apache.org
> Subject: RE: Attachment example errors. Difference between
> document/Literal and Attachments.
>
>
> Rajal,
>
> With doc/lit you don't have to specify the schema in the WSDL, but if you
> don't then you must import it. At some point you must tell WSDL what the
> message format is.
>
> But there's no way to define the contents of the attachment in WSDL
(unless
> someone has developed a WSDL extension that I don't know about).
Attachments
> are outside of WSDL's scope.
>
> Anne
>
>
> > -----Original Message-----
> > From: Rajal Shah [mailto:rashah@cisco.com]
> > Sent: Thursday, April 24, 2003 6:00 PM
> > To: axis-user@ws.apache.org
> > Subject: RE: Attachment example errors. Difference between
> > document/Literal and Attachments.
> >
> >
> > I'm still learning this.. What I meant, was I don't have to specify my
> > message schema inside the WSDL itself in both cases..
> > (Document/Literal and
> > Attachments) - Maybe I am wrong about this assumption..
> >
> > You've answered the main point which is, if I want to exchange
> > large amounts
> > of XML data, what would be my preferred choice (for performance
> > reasons and
> > otherwise) and it seems to be to stick with Document/Literal encoding.
> >
> > Thanks.
> > --
> > Rajal
> >
> >
> >
> > -----Original Message-----
> > From: Anne Thomas Manes [mailto:anne@manes.net]
> > Sent: Thursday, April 24, 2003 2:26 PM
> > To: axis-user@ws.apache.org
> > Subject: RE: Attachment example errors. Difference between
> > document/Literal and Attachments.
> >
> >
> > I don't know what you mean by "document/literal makes the schema of the
> > message format hidden from the WSDL". It's exactly the opposite.
> > In doc/lit,
> > the on-the-wire message format must exactly match the the <message>
> > definition in the schema. (unlike rpc/encoded)
> >
> > If you're passing XML, I recommend sending it in the body, not as an
> > attachment -- regardless of size.
> >
> > Anne
> >
> > > -----Original Message-----
> > > From: Rajal Shah [mailto:rashah@cisco.com]
> > > Sent: Thursday, April 24, 2003 5:05 PM
> > > To: axis-user@ws.apache.org
> > > Subject: Attachment example errors. Difference between
document/Literal
> > > and Attachments.
> > >
> > >
> > > 2 questions.
> > >
> > > 1. Both Document/Literal encoding and Attachments make the schema of
the
> > > message format hidden from the WSDL. So if I want to exchange large
> > > quantities of XML data, when should I be using Attachments v/s the
> > > Document/Literal encoding? (I am not interested in binary
> > > attachments where
> > > Document/Literal may not work).
> > >
> > >
> > > 2. I tried to run the EchoAttachment and the TestRef samples code
under
> > > samples/message but got errors. Help appreciated.
> > >
> > > For TestRef:
> > > java.lang.RuntimeException: No support for attachments
> > > java.lang.RuntimeException: No support for attachments
> > >         at
org.apache.axis.client.Call.setRequestMessage(Call.java:1813)
> > >         at org.apache.axis.client.Call.invoke(Call.java:1488)
> > >         at samples.attachments.TestRef.testit(TestRef.java:217)
> > >         at samples.attachments.TestRef.main(TestRef.java:345)
> > >
> > > For EchoAttachment
> > > java.lang.NullPointerException
> > > java.lang.NullPointerException
> > >         at
> > org.apache.axis.Message.createAttachmentPart(Message.java:614)
> > >         at
> > > javax.xml.soap.SOAPMessage.createAttachmentPart(SOAPMessage.java:245)
> > >
> > >         at
> > > samples.attachments.EchoAttachment.echoUsingSAAJ(EchoAttachment.java:
> > > 524)
> > >         at
> > > samples.attachments.EchoAttachment.main(EchoAttachment.java:363)
> > >
> > > --
> > > Rajal
> > >
> > >
> > > -----Original Message-----
> > > From: dumdum 420 [mailto:dumdum420@hotmail.com]
> > > Sent: Thursday, April 24, 2003 1:51 PM
> > > To: axis-user@ws.apache.org
> > > Subject: AXIS Client : need help WSDL2JAVA
> > >
> > >
> > > I developed a AXIS webservice and made a client using the
> > > wsdl2java utility.
> > >
> > > Now when I try to access my webservice using the generated code which
is
> > > deployed on a remote machine within the same network it does not seem
to
> > > work.
> > >
> > > Then I figured out that the xxxxSoapBindingImpl.java seems to
> > be at fault.
> > >
> > > Kindly help so that I can smoothly invoke my webservice from a remote
> > > machine ...
> > >
> > > Thanx in advance.
> > >
> > > BP
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > _________________________________________________________________
> > > Help STOP SPAM with the new MSN 8 and get 2 months FREE*
> > > http://join.msn.com/?page=features/junkmail
> > >
> > >
> >
> >
>


Re: App Context & Services without EJBs

Posted by Ricky Ho <ri...@cisco.com>.
This is a very common "Singleton" pattern problem.  Comments embedded

>1. When service scope="Request" the connection pooler objects will be
>reinstantiated with all requests and thus won't work.

Yes, this won't work.


>2. When scope="Request" and my ConnectionPooler is "static". Will this setup
>work? Would the static objects also have the scope constraint of "Request"
>and thus get out of scope and not solving my problem?

This will work.  When scope="request", only the object instances is 
affected, not the class itself.  But you rely on a specific implementation 
that class loader won't unload classes once loaded.


>3. When scope="Application", should I make the instance of ConnectionPooler
>a member variable of my service and have it available for all requests that
>way?

Yes, this is OK.

>The artifact of scope="Application" is that my service is instantiated
>only once (which may be good).. but now when a request comes in and each
>request thread run the endpoint method in a separate thread, do they access
>the same private and public variables of the service object?

Yes, and you need to deal with multi-threading issues.

>A
>multi-threading question - the local variables defined within the method is
>still private to each request, right? (since the method is not defined as
>static).

Not necessary.  Basically you need to know which object is thread-private 
or not.


>4. Does service scope="Application" or a "static" ConnectionPooler behave
>the same for my service to access the ConnectionPooler.. I understand the
>implication of my Service object instantiation when scope=Application.

Yes, they give you same semantics
Rgds, Ricky



>Regards.
>--
>Rajal


Re: hasComplexTypes()

Posted by Jeff Greif <jg...@alumni.princeton.edu>.
Take a look at WSIF, which can crack the WSDL and extract the schema
information in a useable form.  You could use org.apache.wsif.schema.Parser,
iterate through the schema types and return true if any are complex.

Jeff

----- Original Message ----- 
From: "Adrian Roston" <ak...@pacbell.net>
To: <ax...@ws.apache.org>
Sent: Thursday, April 24, 2003 8:05 PM
Subject: hasComplexTypes()


> Hi,
>
> What's a real way to do this?
>
>
> (pseudocode)
>
> public boolean hasComplexTypes(wsdl)
> {
> return wsdl.hasComplexTypes();
> }


hasComplexTypes()

Posted by Adrian Roston <ak...@pacbell.net>.
Hi,

What's a real way to do this?


(pseudocode)

public boolean hasComplexTypes(wsdl)
{
return wsdl.hasComplexTypes();
}


TIA,

Adrian

App Context & Services without EJBs

Posted by Rajal Shah <ra...@cisco.com>.
Here's a tricky situation and thought will poke everyone's brains on this..

I have a web service which doesn't use EJBs and J2EE framework. I still need
to do ConnectionPooling. Assume that I already have a ConnectionPooler
implementation. How do I set it up for my service. I am looking for the
ideal way to do it.. Here are some options, I could think ok, but don't have
answers for..

1. When service scope="Request" the connection pooler objects will be
reinstantiated with all requests and thus won't work.

2. When scope="Request" and my ConnectionPooler is "static". Will this setup
work? Would the static objects also have the scope constraint of "Request"
and thus get out of scope and not solving my problem?

3. When scope="Application", should I make the instance of ConnectionPooler
a member variable of my service and have it available for all requests that
way? The artifact of scope="Application" is that my service is instantiated
only once (which may be good).. but now when a request comes in and each
request thread run the endpoint method in a separate thread, do they access
the same private and public variables of the service object? A
multi-threading question - the local variables defined within the method is
still private to each request, right? (since the method is not defined as
static).

4. Does service scope="Application" or a "static" ConnectionPooler behave
the same for my service to access the ConnectionPooler.. I understand the
implication of my Service object instantiation when scope=Application.


Regards.
--
Rajal


RE: Attachment example errors. Difference between document/Literal and Attachments.

Posted by Rajal Shah <ra...@cisco.com>.
hmm.. Here is the WSDL definition for the MessageService sample (doc/literal
example). I don't see any type definition for the request. Much little
attachments. SO what am I missing?

--
Rajal


<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="http://localhost:8080/axis/services/MessageSe
rvice" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdlsoap=
"http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:apachesoap="http://xml.apache.org/
xml-soap" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns1=""
xmlns:intf="http://localhost:8080/axis/services/MessageService"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:impl="http://localhost:8080/axis/services/MessageServic
e" xmlns="http://schemas.xmlsoap.org/wsdl/"><wsdl:types><schema
xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace=""><import
namespace="http://schemas.xmlsoap.org/soap/encoding/"/><element
name="echoElementsReturn" type="xsd:anyType"
/></schema></wsdl:types>
  <wsdl:message name="echoElementsResponse">
    <wsdl:part name="echoElementsReturn" element="echoElementsReturn"/>
  </wsdl:message>
  <wsdl:message name="echoElementsRequest">
  </wsdl:message>
  <wsdl:portType name="MessageService">
    <wsdl:operation name="echoElements">
      <wsdl:input name="echoElementsRequest"
message="intf:echoElementsRequest"/
>
      <wsdl:output name="echoElementsResponse"
message="intf:echoElementsRespons
e"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="MessageServiceSoapBinding" type="intf:MessageService">
    <wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soa
p/http"/>
    <wsdl:operation name="echoElements">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="echoElementsRequest">
        <wsdlsoap:body use="literal"
namespace="http://localhost:8080/axis/servi
ces/MessageService"/>
      </wsdl:input>
      <wsdl:output name="echoElementsResponse">
        <wsdlsoap:body use="literal"
namespace="http://localhost:8080/axis/servi
ces/MessageService"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="MessageService">
    <wsdl:port name="MessageService"
binding="intf:MessageServiceSoapBinding">
      <wsdlsoap:address
location="http://localhost:8080/axis/services/MessageSer
vice"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

-----Original Message-----
From: Anne Thomas Manes [mailto:anne@manes.net]
Sent: Thursday, April 24, 2003 3:15 PM
To: axis-user@ws.apache.org
Subject: RE: Attachment example errors. Difference between
document/Literal and Attachments.


Rajal,

With doc/lit you don't have to specify the schema in the WSDL, but if you
don't then you must import it. At some point you must tell WSDL what the
message format is.

But there's no way to define the contents of the attachment in WSDL (unless
someone has developed a WSDL extension that I don't know about). Attachments
are outside of WSDL's scope.

Anne


> -----Original Message-----
> From: Rajal Shah [mailto:rashah@cisco.com]
> Sent: Thursday, April 24, 2003 6:00 PM
> To: axis-user@ws.apache.org
> Subject: RE: Attachment example errors. Difference between
> document/Literal and Attachments.
>
>
> I'm still learning this.. What I meant, was I don't have to specify my
> message schema inside the WSDL itself in both cases..
> (Document/Literal and
> Attachments) - Maybe I am wrong about this assumption..
>
> You've answered the main point which is, if I want to exchange
> large amounts
> of XML data, what would be my preferred choice (for performance
> reasons and
> otherwise) and it seems to be to stick with Document/Literal encoding.
>
> Thanks.
> --
> Rajal
>
>
>
> -----Original Message-----
> From: Anne Thomas Manes [mailto:anne@manes.net]
> Sent: Thursday, April 24, 2003 2:26 PM
> To: axis-user@ws.apache.org
> Subject: RE: Attachment example errors. Difference between
> document/Literal and Attachments.
>
>
> I don't know what you mean by "document/literal makes the schema of the
> message format hidden from the WSDL". It's exactly the opposite.
> In doc/lit,
> the on-the-wire message format must exactly match the the <message>
> definition in the schema. (unlike rpc/encoded)
>
> If you're passing XML, I recommend sending it in the body, not as an
> attachment -- regardless of size.
>
> Anne
>
> > -----Original Message-----
> > From: Rajal Shah [mailto:rashah@cisco.com]
> > Sent: Thursday, April 24, 2003 5:05 PM
> > To: axis-user@ws.apache.org
> > Subject: Attachment example errors. Difference between document/Literal
> > and Attachments.
> >
> >
> > 2 questions.
> >
> > 1. Both Document/Literal encoding and Attachments make the schema of the
> > message format hidden from the WSDL. So if I want to exchange large
> > quantities of XML data, when should I be using Attachments v/s the
> > Document/Literal encoding? (I am not interested in binary
> > attachments where
> > Document/Literal may not work).
> >
> >
> > 2. I tried to run the EchoAttachment and the TestRef samples code under
> > samples/message but got errors. Help appreciated.
> >
> > For TestRef:
> > java.lang.RuntimeException: No support for attachments
> > java.lang.RuntimeException: No support for attachments
> >         at org.apache.axis.client.Call.setRequestMessage(Call.java:1813)
> >         at org.apache.axis.client.Call.invoke(Call.java:1488)
> >         at samples.attachments.TestRef.testit(TestRef.java:217)
> >         at samples.attachments.TestRef.main(TestRef.java:345)
> >
> > For EchoAttachment
> > java.lang.NullPointerException
> > java.lang.NullPointerException
> >         at
> org.apache.axis.Message.createAttachmentPart(Message.java:614)
> >         at
> > javax.xml.soap.SOAPMessage.createAttachmentPart(SOAPMessage.java:245)
> >
> >         at
> > samples.attachments.EchoAttachment.echoUsingSAAJ(EchoAttachment.java:
> > 524)
> >         at
> > samples.attachments.EchoAttachment.main(EchoAttachment.java:363)
> >
> > --
> > Rajal
> >
> >
> > -----Original Message-----
> > From: dumdum 420 [mailto:dumdum420@hotmail.com]
> > Sent: Thursday, April 24, 2003 1:51 PM
> > To: axis-user@ws.apache.org
> > Subject: AXIS Client : need help WSDL2JAVA
> >
> >
> > I developed a AXIS webservice and made a client using the
> > wsdl2java utility.
> >
> > Now when I try to access my webservice using the generated code which is
> > deployed on a remote machine within the same network it does not seem to
> > work.
> >
> > Then I figured out that the xxxxSoapBindingImpl.java seems to
> be at fault.
> >
> > Kindly help so that I can smoothly invoke my webservice from a remote
> > machine ...
> >
> > Thanx in advance.
> >
> > BP
> >
> >
> >
> >
> >
> >
> >
> > _________________________________________________________________
> > Help STOP SPAM with the new MSN 8 and get 2 months FREE*
> > http://join.msn.com/?page=features/junkmail
> >
> >
>
>



RE: Attachment example errors. Difference between document/Literal and Attachments.

Posted by Anne Thomas Manes <an...@manes.net>.
Rajal,

With doc/lit you don't have to specify the schema in the WSDL, but if you
don't then you must import it. At some point you must tell WSDL what the
message format is.

But there's no way to define the contents of the attachment in WSDL (unless
someone has developed a WSDL extension that I don't know about). Attachments
are outside of WSDL's scope.

Anne


> -----Original Message-----
> From: Rajal Shah [mailto:rashah@cisco.com]
> Sent: Thursday, April 24, 2003 6:00 PM
> To: axis-user@ws.apache.org
> Subject: RE: Attachment example errors. Difference between
> document/Literal and Attachments.
>
>
> I'm still learning this.. What I meant, was I don't have to specify my
> message schema inside the WSDL itself in both cases..
> (Document/Literal and
> Attachments) - Maybe I am wrong about this assumption..
>
> You've answered the main point which is, if I want to exchange
> large amounts
> of XML data, what would be my preferred choice (for performance
> reasons and
> otherwise) and it seems to be to stick with Document/Literal encoding.
>
> Thanks.
> --
> Rajal
>
>
>
> -----Original Message-----
> From: Anne Thomas Manes [mailto:anne@manes.net]
> Sent: Thursday, April 24, 2003 2:26 PM
> To: axis-user@ws.apache.org
> Subject: RE: Attachment example errors. Difference between
> document/Literal and Attachments.
>
>
> I don't know what you mean by "document/literal makes the schema of the
> message format hidden from the WSDL". It's exactly the opposite.
> In doc/lit,
> the on-the-wire message format must exactly match the the <message>
> definition in the schema. (unlike rpc/encoded)
>
> If you're passing XML, I recommend sending it in the body, not as an
> attachment -- regardless of size.
>
> Anne
>
> > -----Original Message-----
> > From: Rajal Shah [mailto:rashah@cisco.com]
> > Sent: Thursday, April 24, 2003 5:05 PM
> > To: axis-user@ws.apache.org
> > Subject: Attachment example errors. Difference between document/Literal
> > and Attachments.
> >
> >
> > 2 questions.
> >
> > 1. Both Document/Literal encoding and Attachments make the schema of the
> > message format hidden from the WSDL. So if I want to exchange large
> > quantities of XML data, when should I be using Attachments v/s the
> > Document/Literal encoding? (I am not interested in binary
> > attachments where
> > Document/Literal may not work).
> >
> >
> > 2. I tried to run the EchoAttachment and the TestRef samples code under
> > samples/message but got errors. Help appreciated.
> >
> > For TestRef:
> > java.lang.RuntimeException: No support for attachments
> > java.lang.RuntimeException: No support for attachments
> >         at org.apache.axis.client.Call.setRequestMessage(Call.java:1813)
> >         at org.apache.axis.client.Call.invoke(Call.java:1488)
> >         at samples.attachments.TestRef.testit(TestRef.java:217)
> >         at samples.attachments.TestRef.main(TestRef.java:345)
> >
> > For EchoAttachment
> > java.lang.NullPointerException
> > java.lang.NullPointerException
> >         at
> org.apache.axis.Message.createAttachmentPart(Message.java:614)
> >         at
> > javax.xml.soap.SOAPMessage.createAttachmentPart(SOAPMessage.java:245)
> >
> >         at
> > samples.attachments.EchoAttachment.echoUsingSAAJ(EchoAttachment.java:
> > 524)
> >         at
> > samples.attachments.EchoAttachment.main(EchoAttachment.java:363)
> >
> > --
> > Rajal
> >
> >
> > -----Original Message-----
> > From: dumdum 420 [mailto:dumdum420@hotmail.com]
> > Sent: Thursday, April 24, 2003 1:51 PM
> > To: axis-user@ws.apache.org
> > Subject: AXIS Client : need help WSDL2JAVA
> >
> >
> > I developed a AXIS webservice and made a client using the
> > wsdl2java utility.
> >
> > Now when I try to access my webservice using the generated code which is
> > deployed on a remote machine within the same network it does not seem to
> > work.
> >
> > Then I figured out that the xxxxSoapBindingImpl.java seems to
> be at fault.
> >
> > Kindly help so that I can smoothly invoke my webservice from a remote
> > machine ...
> >
> > Thanx in advance.
> >
> > BP
> >
> >
> >
> >
> >
> >
> >
> > _________________________________________________________________
> > Help STOP SPAM with the new MSN 8 and get 2 months FREE*
> > http://join.msn.com/?page=features/junkmail
> >
> >
>
>


RE: Attachment example errors. Difference between document/Literal and Attachments.

Posted by Rajal Shah <ra...@cisco.com>.
I'm still learning this.. What I meant, was I don't have to specify my
message schema inside the WSDL itself in both cases.. (Document/Literal and
Attachments) - Maybe I am wrong about this assumption..

You've answered the main point which is, if I want to exchange large amounts
of XML data, what would be my preferred choice (for performance reasons and
otherwise) and it seems to be to stick with Document/Literal encoding.

Thanks.
--
Rajal



-----Original Message-----
From: Anne Thomas Manes [mailto:anne@manes.net]
Sent: Thursday, April 24, 2003 2:26 PM
To: axis-user@ws.apache.org
Subject: RE: Attachment example errors. Difference between
document/Literal and Attachments.


I don't know what you mean by "document/literal makes the schema of the
message format hidden from the WSDL". It's exactly the opposite. In doc/lit,
the on-the-wire message format must exactly match the the <message>
definition in the schema. (unlike rpc/encoded)

If you're passing XML, I recommend sending it in the body, not as an
attachment -- regardless of size.

Anne

> -----Original Message-----
> From: Rajal Shah [mailto:rashah@cisco.com]
> Sent: Thursday, April 24, 2003 5:05 PM
> To: axis-user@ws.apache.org
> Subject: Attachment example errors. Difference between document/Literal
> and Attachments.
>
>
> 2 questions.
>
> 1. Both Document/Literal encoding and Attachments make the schema of the
> message format hidden from the WSDL. So if I want to exchange large
> quantities of XML data, when should I be using Attachments v/s the
> Document/Literal encoding? (I am not interested in binary
> attachments where
> Document/Literal may not work).
>
>
> 2. I tried to run the EchoAttachment and the TestRef samples code under
> samples/message but got errors. Help appreciated.
>
> For TestRef:
> java.lang.RuntimeException: No support for attachments
> java.lang.RuntimeException: No support for attachments
>         at org.apache.axis.client.Call.setRequestMessage(Call.java:1813)
>         at org.apache.axis.client.Call.invoke(Call.java:1488)
>         at samples.attachments.TestRef.testit(TestRef.java:217)
>         at samples.attachments.TestRef.main(TestRef.java:345)
>
> For EchoAttachment
> java.lang.NullPointerException
> java.lang.NullPointerException
>         at org.apache.axis.Message.createAttachmentPart(Message.java:614)
>         at
> javax.xml.soap.SOAPMessage.createAttachmentPart(SOAPMessage.java:245)
>
>         at
> samples.attachments.EchoAttachment.echoUsingSAAJ(EchoAttachment.java:
> 524)
>         at
> samples.attachments.EchoAttachment.main(EchoAttachment.java:363)
>
> --
> Rajal
>
>
> -----Original Message-----
> From: dumdum 420 [mailto:dumdum420@hotmail.com]
> Sent: Thursday, April 24, 2003 1:51 PM
> To: axis-user@ws.apache.org
> Subject: AXIS Client : need help WSDL2JAVA
>
>
> I developed a AXIS webservice and made a client using the
> wsdl2java utility.
>
> Now when I try to access my webservice using the generated code which is
> deployed on a remote machine within the same network it does not seem to
> work.
>
> Then I figured out that the xxxxSoapBindingImpl.java seems to be at fault.
>
> Kindly help so that I can smoothly invoke my webservice from a remote
> machine ...
>
> Thanx in advance.
>
> BP
>
>
>
>
>
>
>
> _________________________________________________________________
> Help STOP SPAM with the new MSN 8 and get 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
>



RE: Attachment example errors. Difference between document/Literal and Attachments.

Posted by Anne Thomas Manes <an...@manes.net>.
I don't know what you mean by "document/literal makes the schema of the
message format hidden from the WSDL". It's exactly the opposite. In doc/lit,
the on-the-wire message format must exactly match the the <message>
definition in the schema. (unlike rpc/encoded)

If you're passing XML, I recommend sending it in the body, not as an
attachment -- regardless of size.

Anne

> -----Original Message-----
> From: Rajal Shah [mailto:rashah@cisco.com]
> Sent: Thursday, April 24, 2003 5:05 PM
> To: axis-user@ws.apache.org
> Subject: Attachment example errors. Difference between document/Literal
> and Attachments.
>
>
> 2 questions.
>
> 1. Both Document/Literal encoding and Attachments make the schema of the
> message format hidden from the WSDL. So if I want to exchange large
> quantities of XML data, when should I be using Attachments v/s the
> Document/Literal encoding? (I am not interested in binary
> attachments where
> Document/Literal may not work).
>
>
> 2. I tried to run the EchoAttachment and the TestRef samples code under
> samples/message but got errors. Help appreciated.
>
> For TestRef:
> java.lang.RuntimeException: No support for attachments
> java.lang.RuntimeException: No support for attachments
>         at org.apache.axis.client.Call.setRequestMessage(Call.java:1813)
>         at org.apache.axis.client.Call.invoke(Call.java:1488)
>         at samples.attachments.TestRef.testit(TestRef.java:217)
>         at samples.attachments.TestRef.main(TestRef.java:345)
>
> For EchoAttachment
> java.lang.NullPointerException
> java.lang.NullPointerException
>         at org.apache.axis.Message.createAttachmentPart(Message.java:614)
>         at
> javax.xml.soap.SOAPMessage.createAttachmentPart(SOAPMessage.java:245)
>
>         at
> samples.attachments.EchoAttachment.echoUsingSAAJ(EchoAttachment.java:
> 524)
>         at
> samples.attachments.EchoAttachment.main(EchoAttachment.java:363)
>
> --
> Rajal
>
>
> -----Original Message-----
> From: dumdum 420 [mailto:dumdum420@hotmail.com]
> Sent: Thursday, April 24, 2003 1:51 PM
> To: axis-user@ws.apache.org
> Subject: AXIS Client : need help WSDL2JAVA
>
>
> I developed a AXIS webservice and made a client using the
> wsdl2java utility.
>
> Now when I try to access my webservice using the generated code which is
> deployed on a remote machine within the same network it does not seem to
> work.
>
> Then I figured out that the xxxxSoapBindingImpl.java seems to be at fault.
>
> Kindly help so that I can smoothly invoke my webservice from a remote
> machine ...
>
> Thanx in advance.
>
> BP
>
>
>
>
>
>
>
> _________________________________________________________________
> Help STOP SPAM with the new MSN 8 and get 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
>


Attachment example errors. Difference between document/Literal and Attachments.

Posted by Rajal Shah <ra...@cisco.com>.
2 questions.

1. Both Document/Literal encoding and Attachments make the schema of the
message format hidden from the WSDL. So if I want to exchange large
quantities of XML data, when should I be using Attachments v/s the
Document/Literal encoding? (I am not interested in binary attachments where
Document/Literal may not work).


2. I tried to run the EchoAttachment and the TestRef samples code under
samples/message but got errors. Help appreciated.

For TestRef:
java.lang.RuntimeException: No support for attachments
java.lang.RuntimeException: No support for attachments
        at org.apache.axis.client.Call.setRequestMessage(Call.java:1813)
        at org.apache.axis.client.Call.invoke(Call.java:1488)
        at samples.attachments.TestRef.testit(TestRef.java:217)
        at samples.attachments.TestRef.main(TestRef.java:345)

For EchoAttachment
java.lang.NullPointerException
java.lang.NullPointerException
        at org.apache.axis.Message.createAttachmentPart(Message.java:614)
        at
javax.xml.soap.SOAPMessage.createAttachmentPart(SOAPMessage.java:245)

        at
samples.attachments.EchoAttachment.echoUsingSAAJ(EchoAttachment.java:
524)
        at samples.attachments.EchoAttachment.main(EchoAttachment.java:363)

--
Rajal


-----Original Message-----
From: dumdum 420 [mailto:dumdum420@hotmail.com]
Sent: Thursday, April 24, 2003 1:51 PM
To: axis-user@ws.apache.org
Subject: AXIS Client : need help WSDL2JAVA


I developed a AXIS webservice and made a client using the wsdl2java utility.

Now when I try to access my webservice using the generated code which is
deployed on a remote machine within the same network it does not seem to
work.

Then I figured out that the xxxxSoapBindingImpl.java seems to be at fault.

Kindly help so that I can smoothly invoke my webservice from a remote
machine ...

Thanx in advance.

BP







_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail