[prev in list] [next in list] [prev in thread] [next in thread]
List: apollo-dev
Subject: Re: Problem to call web service through WSDL2Java
From: "Sachin Sisodia" <sachin.sisodia () gmail ! com>
Date: 2007-03-13 2:39:22
Message-ID: acee60a50703121939j34e61feaj57ebde20116635c () mail ! gmail ! com
[Download RAW message or body]
Hi Jose,
That problem has been resolved after giving a "Anonymous" access to target
service. Thanks for your response. I have posted one more problem where I am
unable to pass stream value as an input. I would appreciate if you can
response on that also.
Regards
Sachin
On 3/9/07, José Antonio Sánchez <getaceres@gmail.com> wrote:
>
> Sorry, I thought you were using WSRF because I have received that
> e-mail in that list and I didn't realize that the first time I
> received it from axis-user list, so I suppose you are using Axis 1.X
> here.
> Just to be sure: You have created the wsdl file that you sent me by
> hand. It has one method that receives a string. With that wsdl you
> have created a skeleton service that you are implementing. That
> service gets a string as input and calls another service with that
> string (the 'input' variable that I requested before contains that
> string?).
> I don't know exactly how your service is implemented and all your code
> but I suppose that in some parameter you pass to the Call object it
> may be a null object or an empty string so serialization of the
> request fails.
>
> On 3/9/07, Sachin Sisodia <sachin.sisodia@gmail.com> wrote:
> > Hi Jose,
> > Let me clear our requirement, We have webMethods integration server with
> us
> > and it is containing some inbuilt services. what we need to do here to
> call
> > these services from outside through web services.
> >
> > I have created WSDL file for the mentioned service. That service is
> doing
> > nothing just mapping input string variable to output variable as shown
> > below:
> >
> >
> -------------------------------------------------------------------------------------------------------------------------
>
> >
> >
> >
> > // pipeline
> > IDataCursor pipelineCursor = pipeline.getCursor();
> > String inputVariable = IDataUtil.getString( pipelineCursor, "input" );
> > pipelineCursor.destroy();
> >
> > // pipeline
> > IDataCursor pipelineCursor_1 = pipeline.getCursor();
> > IDataUtil.put( pipelineCursor_1, "output", inputVariable );
> > pipelineCursor_1.destroy();
> > -----------------------------------------------------------------
> >
> > I am using help from WSDL2JAVA to acheive it but getting the error in
> > runtime.I am not sure what I need to do next.
> >
> >
> > Regards
> > Sachin
> >
> >
> >
> >
> >
> >
> > On 3/9/07, José Antonio Sánchez <getaceres@gmail.com> wrote:
> > > You don't have any resource property document, so, why are you using
> > > WSRF? It's easier to use Axis or Axis2 to develop simple services.
> > > Also, if you are starting a new project, consider using Muse2 instead
> > > of Apache WSRF since it implements WSRF as well and it's easier to use
> > > and in more active development. Look for it in:
> > >
> > > http://ws.apache.org/muse
> > >
> > > For your problem, it's not a matter of the invoked wsdl but I was
> > > asking about your client code, specially what's in the input variable.
> > >
> > > On 3/9/07, Sachin Sisodia < sachin.sisodia@gmail.com> wrote:
> > > > Hi Jose,
> > > > Please find the attached WSDL file that I have generated for web
> > service. I
> > > > am invoking a service from webMethods and it is simple service for
> > printing
> > > > log file. Thanks for any help in this regard as I stuck in it from
> past
> > 2
> > > > days.
> > > >
> > > >
> > > > Regards
> > > > Sachin
> > > >
> > > >
> > > >
> > > > On 3/8/07, José Antonio Sánchez < getaceres@gmail.com> wrote:
> > > > > What's the complete stack trace?
> > > > >
> > > > > Anyway, maybe the problem is here:
> > > > >
> > > > > java.lang.Object _resp = _call.invoke(new java.lang.Object []
> > {input});
> > > > >
> > > > > Could you put what input is?
> > > > >
> > > > > On 3/8/07, Sachin Sisodia <sachin.sisodia@gmail.com> wrote:
> > > > > > Hi Jose,
> > > > > > Thanks for your response on this. I have tried with your
> suggestion
> > and
> > > > > > changed the statement as folllow:
> > > > > > _call.setSOAPActionURI(" http://localhost/service/testWS");
> > > > > >
> > > > > > But still I am getting the same error message. I would
> appreciate
> > for
> > > > your
> > > > > > help in this regard.
> > > > > >
> > > > > >
> > > > > > Regards
> > > > > > Sachin
> > > > > >
> > > > > >
> > > > > > On 3/8/07, José Antonio Sánchez <getaceres@gmail.com> wrote:
> > > > > > >
> > > > > > > Maybe this call is the problem.
> > > > > > >
> > > > > > > _call.setSOAPActionURI("");
> > > > > > >
> > > > > > > Try setting a valid URI instead of the empty one.
> > > > > > >
> > > > > > > On 3/8/07, Sachin Sisodia < sachin.sisodia@gmail.com> wrote:
> > > > > > > >
> > > > > > > > Hi All,
> > > > > > > > I am gettig the error message while trying to run the below
> code
> > to
> > > > call
> > > > > > web
> > > > > > > > service:
> > > > > > > >
> > > > > > > > Code:
> > > > > > > >
> > --------------------------------------------------
> > > > > > > > org.apache.axis.client.Call
> > > > > > > > _call = createCall();
> > > > > > > > _call.setOperation(_operations[0]);
> > > > > > > > _call.setUseSOAPAction(true);
> > > > > > > > _call.setSOAPActionURI("");
> > > > > > > >
> > > > > >
> > > >
> > _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS
> > > > );
> > > > > > > > _call.setOperationName(new
> > > > > > > > javax.xml.namespace.QName(" http://10.171.44.97/service",
> > > > > > > > "testWS"));
> > > > > > > >
> > > > > > > > setRequestHeaders(_call);
> > > > > > > > setAttachments(_call);
> > > > > > > > System.out.println("before invoke");
> > > > > > > > java.lang.Object _resp = _call.invoke(new java.lang.Object[]
> > > > {input});
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > >
> > > >
> >
> --------------------------------------------------------------------------
> > > > > > > >
> > > > > > > >
> > > > > > > > Error-
> > > > > > > >
> > > > > > > >
> > > > > > > > ----------------------------------
> > > > > > > >
> > > > > > > > org.xml.sax.SAXException: Error: URI=
> > > > > > > > null Line=3: Illegal
> > > > > > > > xml:lang value "".
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ----------------------------------
> > > > > > > >
> > > > > > > > I would appreciate if anyone can help me out.
> > > > > > > >
> > > > > > > > Thanks in advance.
> > > > > > > >
> > > > > > > > Regards
> > > > > > > > Sachin
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Saludos.
> > > > > > > José Antonio Sánchez
> > > > > > >
> > > > > > >
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
> > > > > > wsrf-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail: wsrf-user-help@ws.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Saludos.
> > > > > José Antonio Sánchez
> > > > >
> > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> > > > wsrf-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: wsrf-user-help@ws.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > wsrf-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: wsrf-user-help@ws.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Saludos.
> > > José Antonio Sánchez
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > wsrf-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: wsrf-user-help@ws.apache.org
> > >
> > >
> >
> >
>
>
> --
> Saludos.
> José Antonio Sánchez
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wsrf-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: wsrf-user-help@ws.apache.org
>
>
[Attachment #3 (text/html)]
<div>Hi Jose, </div>
<div>That problem has been resolved after giving a "Anonymous" access to \
target service. Thanks for your response. I have posted one more problem where \
I am unable to pass stream value as an input. I would appreciate if you \
can response on that also. </div>
<div> </div>
<div>Regards</div>
<div>Sachin<br><br> </div>
<div><span class="gmail_quote">On 3/9/07, <b class="gmail_sendername">José Antonio \
Sánchez</b> <<a href="mailto:getaceres@gmail.com">getaceres@gmail.com</a>> \
wrote:</span> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px \
0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Sorry, I thought you were using WSRF \
because I have received that<br>e-mail in that list and I didn't realize that the \
first time I <br>received it from axis-user list, so I suppose you are using Axis \
1.X<br>here.<br>Just to be sure: You have created the wsdl file that you sent me \
by<br>hand. It has one method that receives a string. With that wsdl you <br>have \
created a skeleton service that you are implementing. That<br>service gets a string \
as input and calls another service with that<br>string (the 'input' variable \
that I requested before contains that<br>string?). <br>I don't know exactly how \
your service is implemented and all your code<br>but I suppose that in some parameter \
you pass to the Call object it<br>may be a null object or an empty string so \
serialization of the<br>request fails. <br><br>On 3/9/07, Sachin Sisodia <<a \
href="mailto:sachin.sisodia@gmail.com">sachin.sisodia@gmail.com</a>> \
wrote:<br>> Hi Jose,<br>> Let me clear our requirement, We have webMethods \
integration server with us<br> > and it is containing some inbuilt services. what \
we need to do here to call<br>> these services from outside through web \
services.<br>><br>> I have created WSDL file for the mentioned service. That \
service is doing <br>> nothing just mapping input string variable to output \
variable as shown<br>> below:<br>><br>> \
-------------------------------------------------------------------------------------------------------------------------
<br>><br>><br>><br>> // pipeline<br>> IDataCursor pipelineCursor = \
pipeline.getCursor();<br>> String inputVariable = IDataUtil.getString( \
pipelineCursor, "input" );<br>> pipelineCursor.destroy \
();<br>><br>> // pipeline<br>> IDataCursor pipelineCursor_1 = \
pipeline.getCursor();<br>> IDataUtil.put( pipelineCursor_1, "output", \
inputVariable );<br>> pipelineCursor_1.destroy();<br>> \
----------------------------------------------------------------- <br>><br>> I \
am using help from WSDL2JAVA to acheive it but getting the error in<br>> runtime.I \
am not sure what I need to do next.<br>><br>><br>> Regards<br>> \
Sachin<br>><br>><br>><br>><br> ><br>><br>> On 3/9/07, José \
Antonio Sánchez <<a href="mailto:getaceres@gmail.com">getaceres@gmail.com</a>> \
wrote:<br>> > You don't have any resource property document, so, why are \
you using<br>> > WSRF? It's easier to use Axis or Axis2 to develop simple \
services. <br>> > Also, if you are starting a new project, consider using Muse2 \
instead<br>> > of Apache WSRF since it implements WSRF as well and it's \
easier to use<br>> > and in more active development. Look for it in: <br>> \
><br>> > <a \
href="http://ws.apache.org/muse">http://ws.apache.org/muse</a><br>> ><br>> \
> For your problem, it's not a matter of the invoked wsdl but I was<br>> \
> asking about your client code, specially what's in the input variable. \
<br>> ><br>> > On 3/9/07, Sachin Sisodia < <a \
href="mailto:sachin.sisodia@gmail.com">sachin.sisodia@gmail.com</a>> \
wrote:<br>> > > Hi Jose,<br>> > > Please find the attached WSDL \
file that I have generated for web <br>> service. I<br>> > > am invoking \
a service from webMethods and it is simple service for<br>> printing<br>> > \
> log file. Thanks for any help in this regard as I stuck in it from past<br>> \
2 <br>> > > days.<br>> > ><br>> > ><br>> > > \
Regards<br>> > > Sachin<br>> > ><br>> > ><br>> > \
><br>> > > On 3/8/07, José Antonio Sánchez < <a \
href="mailto:getaceres@gmail.com">getaceres@gmail.com</a>> wrote:<br>> > \
> > What's the complete stack trace?<br>> > > ><br>> > \
> > Anyway, maybe the problem is here:<br>> > > > <br>> > \
> > java.lang.Object _resp = _call.invoke(new java.lang.Object []<br>> \
{input});<br>> > > ><br>> > > > Could you put what input \
is?<br>> > > ><br>> > > > On 3/8/07, Sachin Sisodia < <a \
href="mailto:sachin.sisodia@gmail.com">sachin.sisodia@gmail.com</a>> \
wrote:<br>> > > > > Hi Jose,<br>> > > > > Thanks for \
your response on this. I have tried with your suggestion<br>> and <br>> > \
> > > changed the statement as folllow:<br>> > > > \
> _call.setSOAPActionURI(" <a \
href="http://localhost/service/testWS">http://localhost/service/testWS</a>");<br>> \
> > > > <br>> > > > > But still I am getting the same \
error message. I would appreciate<br>> for<br>> > > your<br>> > \
> > > help in this regard.<br>> > > > ><br>> > > \
> > <br>> > > > > Regards<br>> > > > > \
Sachin<br>> > > > ><br>> > > > ><br>> > > > \
> On 3/8/07, José Antonio Sánchez <<a href="mailto:getaceres@gmail.com"> \
getaceres@gmail.com</a>> wrote:<br>> > > > > ><br>> > > \
> > > Maybe this call is the problem.<br>> > > > > \
><br>> > > > > > _call.setSOAPActionURI(""); <br>> \
> > > > ><br>> > > > > > Try setting a valid URI \
instead of the empty one.<br>> > > > > ><br>> > > > \
> > On 3/8/07, Sachin Sisodia < <a href="mailto:sachin.sisodia@gmail.com"> \
sachin.sisodia@gmail.com</a>> wrote:<br>> > > > > > ><br>> \
> > > > > > Hi All,<br>> > > > > > > I am \
gettig the error message while trying to run the below code <br>> to<br>> > \
> call<br>> > > > > web<br>> > > > > > > \
service:<br>> > > > > > ><br>> > > > > > > \
Code:<br>> > > > > > > <br>> \
--------------------------------------------------<br>> > > > > > \
> org.apache.axis.client.Call<br>> > > > > > \
> _call = createCall();<br>> > > > > > \
> _call.setOperation(_operations[0]); <br>> > > > > > \
> _call.setUseSOAPAction(true);<br>> > > > > > \
> _call.setSOAPActionURI("");<br>> > > > > \
> ><br>> > > > ><br>> > > <br>> \
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS<br>> > \
> );<br>> > > > > > \
> _call.setOperationName(new<br>> > > > > > > \
javax.xml.namespace.QName (" <a \
href="http://10.171.44.97/service">http://10.171.44.97/service</a>",<br>> \
> > > > > > "testWS"));<br>> > > > > > \
><br>> > > > > > > setRequestHeaders(_call); \
<br>> > > > > > > setAttachments(_call);<br>> > \
> > > > > System.out.println("before \
invoke");<br>> > > > > > > java.lang.Object \
_resp = _call.invoke(new java.lang.Object []<br>> > > {input});<br>> \
> > > > > ><br>> > > > > > ><br>> > > \
> > > ><br>> > > > > > ><br>> > > > > \
<br>> > ><br>> \
--------------------------------------------------------------------------<br>> \
> > > > > ><br>> > > > > > ><br>> > > \
> > > > Error- <br>> > > > > > ><br>> > > \
> > > ><br>> > > > > > > \
----------------------------------<br>> > > > > > ><br>> > \
> > > > >
org.xml.sax.SAXException: Error: URI=<br>> > > > > > > null \
Line=3: Illegal<br>> > > > > > > xml:lang value \
"".<br>> > > > > > ><br>> > > > > > \
> <br>> > > > > > ><br>> > > > > > > \
----------------------------------<br>> > > > > > ><br>> > \
> > > > > I would appreciate if anyone can help me out. <br>> > \
> > > > ><br>> > > > > > > Thanks in \
advance.<br>> > > > > > ><br>> > > > > > > \
Regards<br>> > > > > > > Sachin <br>> > > > > \
><br>> > > > > ><br>> > > > > > --<br>> \
> > > > > Saludos.<br>> > > > > > José Antonio \
Sánchez<br>> > > > > > <br>> > > > > ><br>> \
> > > ><br>> > ><br>> \
---------------------------------------------------------------------<br>> > \
> > > > To unsubscribe, e-mail:<br>> > > > > <a \
href="mailto:wsrf-user-unsubscribe@ws.apache.org">wsrf-user-unsubscribe@ws.apache.org</a><br>> \
> > > > > For additional commands, e-mail: <a \
href="mailto:wsrf-user-help@ws.apache.org">wsrf-user-help@ws.apache.org </a><br>> \
> > > > ><br>> > > > > ><br>> > > > \
><br>> > > > ><br>> > > ><br>> > > \
><br>> > > > --<br>> > > > Saludos. <br>> > > \
> José Antonio Sánchez<br>> > > ><br>> > > ><br>> > \
><br>> ---------------------------------------------------------------------<br>> \
> > > To unsubscribe, e-mail: <br>> > > <a \
href="mailto:wsrf-user-unsubscribe@ws.apache.org">wsrf-user-unsubscribe@ws.apache.org</a><br>> \
> > > For additional commands, e-mail: <a \
href="mailto:wsrf-user-help@ws.apache.org">wsrf-user-help@ws.apache.org </a><br>> \
> > ><br>> > > ><br>> > ><br>> > ><br>> \
> ><br>> ---------------------------------------------------------------------<br>> \
> > To unsubscribe, e-mail: <br>> <a \
href="mailto:wsrf-user-unsubscribe@ws.apache.org">wsrf-user-unsubscribe@ws.apache.org</a><br>> \
> > For additional commands, e-mail: <a \
href="mailto:wsrf-user-help@ws.apache.org">wsrf-user-help@ws.apache.org </a><br>> \
> ><br>> > ><br>> ><br>> ><br>> > --<br>> > \
Saludos.<br>> > José Antonio Sánchez<br>> ><br>> ><br>> \
--------------------------------------------------------------------- <br>> > \
To unsubscribe, e-mail:<br>> <a \
href="mailto:wsrf-user-unsubscribe@ws.apache.org">wsrf-user-unsubscribe@ws.apache.org</a><br>> \
> For additional commands, e-mail: <a href="mailto:wsrf-user-help@ws.apache.org"> \
wsrf-user-help@ws.apache.org</a><br>> ><br>> \
><br>><br>><br><br><br>--<br>Saludos.<br>José Antonio \
Sánchez<br><br>---------------------------------------------------------------------<br>To \
unsubscribe, e-mail: <a \
href="mailto:wsrf-user-unsubscribe@ws.apache.org">wsrf-user-unsubscribe@ws.apache.org</a><br>For \
additional commands, e-mail: <a \
href="mailto:wsrf-user-help@ws.apache.org">wsrf-user-help@ws.apache.org</a><br><br></blockquote>
</div><br>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic