Mail Archive Home | spago-dev List | March 2008 Index
| <-- Date Index --> | <-- Thread Index --> |
Hi Uday,what I mean is that the Spago WebService accepts a request like the following one (this is an example produced by the AdapterAxis):
<?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:Header><ns1:sessionID soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" href="#id0" xmlns:ns1="http://xml.apache.org/axis/session"/>
</soapenv:Header> <soapenv:Body><ns2:service soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://axis.soap.spago.eng.it"> <request xsi:type="xsd:string"><SERVICE_REQUEST ACTION_NAME="INCREMENTA_NUMERO" /></request>
</ns2:service><multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="soapenc:long" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">6077299577654600973</multiRef>
</soapenv:Body> </soapenv:Envelope> As you can see the request is encoded:<request xsi:type="xsd:string"><SERVICE_REQUEST ACTION_NAME="INCREMENTA_NUMERO" /></request>
This arise because the method defined in the WSDL has a single parameter defined as string: this string contains the XML that Spago uses.
Also the request parameter is contained within a <service> tag.The format of the SOAP envelope may change slightly if you use the Apache SOAP implementation.
Best Regards
*Gianfranco Boccalon*
______________________________________
<www.spagoworld.org>
Spago&Spagic Project Leader
______________________________________
Senior Consultant
Architectures & Consulting
Research & Innovation Division
*Engineering Ingegneria Informatica S.p.A.
*
Corso Stati Uniti, 23/C - 35127 Padova - Italy
Phone: +39-049.8692511 Fax:+39-049.8692566
Mobile: +39-3357813507
*www.eng.it www.spagoworld.org*
Uday-A Kumar ha scritto:
Hi Boccalon,We are using the following code and we have observed that the soap envelope is building properly without having any encoding problems.After running the below program we are getting the following errorMaking SOAP Envelope : calling soapEnvelope<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body><SERVICE_REQUEST PAGE="TEST_PAGE"/> </SOAP-ENV:Body></SOAP-ENV:Envelope>Axis Fault Exception occured in SOAP CALL:- Unable to determine object id from call: is the method element namespaced?*private* SOAPEnvelope callWebSerice() *throws* SysException{ SOAPEnvelope envelope = *null*;/endpoint_addr/ = "http://localhost:7001/bfpservices/servlet/rpcrouter";/soapMsg/="<SOAP-ENV:Envelope " +"xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\"> " + "<SOAP-ENV:Body>\n" + "<SERVICE_REQUEST PAGE=\"TEST_PAGE\">"+ "</SERVICE_REQUEST>\n"+ "</SOAP-ENV:Body></SOAP-ENV:Envelope>\n"; *try*{Service service = *new* Service(); Call call = (Call) service.createCall(); //Setting up endpoint addresscall.setTargetEndpointAddress(*new* URL(/endpoint_addr/)); InputStream input = *new* ByteArrayInputStream(/soapMsg/.getBytes());//Making a SOAP Envelope of the Input XMLSOAPEnvelope soapEnvelope = *new* SOAPEnvelope(input);System./out/.println("Making SOAP Envelope : calling soapEnvelope"+soapEnvelope); //call.setEncodingStyle("http://schemas.xmlsoap.org/soap/encoding/");call.invoke(soapEnvelope);System./out/.println("SOAP Call Complete");envelope = call.getMessageContext().getResponseMessage().getSOAPEnvelope();*if*(/logger/.isDebugEnabled())System./out/.println("Soap response :" + envelope);}*catch*(AxisFault e){System./out/.println("Axis Fault Exception occured in SOAP CALL:- "+e); *throw* *new* SysException("SE.common.InternalErrorOccured",e,*true*); }*catch*(MalformedURLException e) { System./out/.println("MalformedURLException occured in SOAP CALL:- "+ e); *throw* *new* SysException("SE.common.InternalErrorOccured",e,*true*); }*catch* (ServiceException e) { System./out/.println("MalformedURLException occured in SOAP CALL:- "+ e); *throw* *new* SysException("SE.common.InternalErrorOccured",e,*true*); }*catch* (SAXException e) { System./out/.println("MalformedURLException occured in SOAP CALL:- "+ e); *throw* *new* SysException("SE.common.InternalErrorOccured",e,*true*); }*return* envelope; } Please help us in resolving the issue. Thanks and Regards Uday Kumar OBTS TechnoFunctional Analyst Avenue Marnixlaan, 13 1000 Brussels Phone: +32 (0)2 551 6056 ************************************************************************************** This mail is transmitted to you on behalf of Tata Consultancy Services. Diese Post wird Ihnen im Namen der Tata Consultancy Services ubermittelt***************************************************************************************Gianfranco Boccalon <gianfranco.boccalon@xxxxxx>* 18/03/2008 14:54 To Uma Gudi <uma.gudi@xxxxxxx> cc spago-dev@xxxxxxx, uday-a.kumar@xxxxxx Subject Re: [[spago-dev]] Reg. How to enable SOAP WebService in SPAGO The problem is not with namespaces, but with method signature: the method that Spago expose accept a single input parameter that is astring. This string is for example "<SERVICE_REQUEST PAGE=\"TEST_PAGE\"/>.".The string is encoded when it's sent over the wire, so the message that is sent it's not exactly as you expect. If you use a TCP monitor you should see the encoded string. This is the reason why the AdapterProxy works and your code not. You have to encode the string before sending it, and you have to produce the same Envelope that AdapterProxy produces. Best Regards *Gianfranco Boccalon* ______________________________________ <www.spagoworld.org> Spago&Spagic Project Leader ______________________________________ Senior Consultant Architectures & Consulting Research & Innovation Division *Engineering Ingegneria Informatica S.p.A. * Corso Stati Uniti, 23/C - 35127 Padova - Italy Phone: +39-049.8692511 Fax:+39-049.8692566 Mobile: +39-3357813507 *www.eng.it www.spagoworld.org*Uma Gudi ha scritto: > > Hi Boccalon, > > Thanks for the response. > > I have tried with the provided SOAP message.But I am getting the > following error > > "Axis Fault Exception occured in SOAP CALL:- Unable to determine > object id from call: is the method element namespaced?" > > My Request is as below > > /soapMsg/="<SOAP-ENV:Envelope " + > > "xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\"> " + > > "<SOAP-ENV:Body>\n" + > > "<SERVICE_REQUEST PAGE=\"TEST_PAGE\">"+ > > "</SERVICE_REQUEST>\n"+ > > "</SOAP-ENV:Body></SOAP-ENV:Envelope>\n"; > > And I have used Axis api (org.apache.axis.client.Call) to invoke the > service. > > The above service is working fine if I use AdapterProxy and the > request as <SERVICE_REQUEST PAGE=\"TEST_PAGE\"/>. > > Please help me in this regard.Thanks a lot for the help provided. > > Thanks and BestRegards > Uma Maheswara Rao Gudi > Tata Consultancy Services > Mailto: uma.gudi@xxxxxxx > Website: http://www.tcs.com > ____________________________________________ > Experience certainty. IT Services > Business Solutions > Outsourcing > ____________________________________________ > > *Gianfranco Boccalon <gianfranco.boccalon@xxxxxx>* > > 03/17/2008 13:47 CET >> > To > > Uma Gudi <uma.gudi@xxxxxxx>>> cc > > spago-dev@xxxxxxx, uday-a.kumar@xxxxxx>> bcc > > > Subject > > Re: [[spago-dev]] Reg. How to enable SOAP WebService in SPAGO > >> > The WSDL for Spago Web Services is fixed; this means that a SOAP request > for Spago services is always like the following sample: > > <SOAP-ENV:Envelope > xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/ > > <SOAP-ENV:Body> > <SERVICE_REQUEST ACTION_NAME="some_action" other_attributes="..."> > <other XML content> > </SERVICE_REQUEST> > > </SOAP-ENV:Body></SOAP-ENV:Envelope> > > > The ACTION_NAME (or the PAGE) attribute identify the service to execute. > > If you need a Web service interface different from this one you need > implementing your own interface (with Axis for example) and then use a > custom adapter derived from the AdapterSOAP (or the AdapterAxis) > provided with Spago. > > Best Regards > > *Gianfranco Boccalon* > ______________________________________ > <www.spagoworld.org> > > Spago&Spagic Project Leader > ______________________________________ > > Senior Consultant > Architectures & Consulting > Research & Innovation Division > *Engineering Ingegneria Informatica S.p.A. > * > Corso Stati Uniti, 23/C - 35127 Padova - Italy > Phone: +39-049.8692511 Fax:+39-049.8692566 > Mobile: +39-3357813507 > > *www.eng.it www.spagoworld.org* > > > > > Uma Gudi ha scritto: > > > > Hi Boocalon > > > > Thanks for the quick response. > > > > The enabling of the webservice can be done in two ways > > > > 1) Document-oriented (the SOAP message contains a document) > > > > 2) RPC-oriented (the SOAP message contains parameters and return > values). > > > > I have gone through the document and found that the document explains > > about the second approach using the axis client API. > > > > As we need to expose our service to the ASP application ,we would like > > to implement using the first approach(document oriented).If possible > > please provide us the sample code as well. > > > > In the example provided by the document usually we will use the > > request XML as "<SERVICE_REQUEST ACTION_NAME="INCREMENTA_NUMERO" but> > as per our requirement we need to use the fully compliant SOAP request.> > > > e.g: > > > > <SOAP-ENV:Envelope > > xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/ > > > > <SOAP-ENV:Body> > > > > <GetCurrencyRate:GetCurrencyRate > > xmlns:GetCurrencyRate="uri:GetCurrencyRate"> > > > > <CURRENCY>EUR</CURRENCY>> > > > > <TARGET>USD</TARGET> > > > > </GetCurrencyRate:GetCurrencyRate> > > > > </SOAP-ENV:Body></SOAP-ENV:Envelope> > > > > Pls let us know how to implement the same using SPAGO framework > > > > Thanks and BestRegards > > Uma Maheswara Rao Gudi > > Tata Consultancy Services > > Mailto: uma.gudi@xxxxxxx > > Website: http://www.tcs.com > > ____________________________________________ > > Experience certainty. IT Services > > Business Solutions > > Outsourcing > > ____________________________________________ > > > > *Gianfranco Boccalon <gianfranco.boccalon@xxxxxx>* > > > > 03/17/2008 10:29 CET > > > > > > To > > > > Uma Gudi <uma.gudi@xxxxxxx> > > > > cc > > > > spago-dev@xxxxxxx, uday-a.kumar@xxxxxx > > > > bcc > > > > > > Subject > > > > Re: [[spago-dev]] Reg. How to enable SOAP WebService in SPAGO > > > > > > > > Hi, > > in the default Spago configuration (the configuration released in the> > samples) all services are automatically exposed as Web Services, through> > the Apache SOAP implementation. > > However there is also the Axis implementation available: you can find > > all the details about Spago Web Services in the document> > "webservice.pdf" within the file spago-docs-en-pdf-20070410.zip released> > in the documentation section of the OW2 forge. > > > > Best regards > > > > *Gianfranco Boccalon* > > ______________________________________ > > <www.spagoworld.org> > > > > Spago&Spagic Project Leader > > ______________________________________ > > > > Senior Consultant > > Architectures & Consulting > > Research & Innovation Division > > *Engineering Ingegneria Informatica S.p.A. > > * > > Corso Stati Uniti, 23/C - 35127 Padova - Italy > > Phone: +39-049.8692511 Fax:+39-049.8692566 > > Mobile: +39-3357813507 > > > > *www.eng.it www.spagoworld.org* > > > > > > > > > > Uma Gudi ha scritto: > > > Hi, > > > > > > We are using the spago framework in service tier.We have the > > requirement to > > > expose our SPAGO webservices to the ASP application. > > > > > > Could you please send me the detail steps required to expose spago > > services > > > as webservices(fully soap compliant).If possible please provide > > sample code > > > to implement the same > > > > > > Thanks and regards > > > > > > Uma Maheswara Rao Gudi > > > > > > =====-----=====-----===== > > > Notice: The information contained in this e-mail > > > message and/or attachments to it may contain > > > confidential or privileged information. If you are > > > not the intended recipient, any dissemination, use, > > > review, distribution, printing or copying of the > > > information contained in this e-mail message > > > and/or attachments to it are strictly prohibited. If > > > you have received this communication in error, > > > please notify us by reply e-mail or telephone and > > > immediately and permanently delete the message > > > and any attachments. Thank you > > > > > > > > > > > > > > > > > > -- > > > > ForwardSourceID:NT0000F182 > > =====-----=====-----===== > > Notice: The information contained in this e-mail > > message and/or attachments to it may contain > > confidential or privileged information. If you are > > not the intended recipient, any dissemination, use, > > review, distribution, printing or copying of the > > information contained in this e-mail message > > and/or attachments to it are strictly prohibited. If > > you have received this communication in error, > > please notify us by reply e-mail or telephone and > > immediately and permanently delete the message > > and any attachments. Thank you > > > > > > > > > -- > > ForwardSourceID:NT0000F192 > =====-----=====-----===== > Notice: The information contained in this e-mail > message and/or attachments to it may contain > confidential or privileged information. If you are > not the intended recipient, any dissemination, use, > review, distribution, printing or copying of the > information contained in this e-mail message > and/or attachments to it are strictly prohibited. If > you have received this communication in error, > please notify us by reply e-mail or telephone and > immediately and permanently delete the message > and any attachments. Thank you > >>-- --Informationen (einschließlich Pflichtangaben) zu einzelnen, innerhalb der EU tätigen Gesellschaften und Zweigniederlassungen des Konzerns Deutsche Bank finden Sie unter _http://www.db.com/de/content/pflichtangaben.htm_. Diese E-Mail enthält vertrauliche und/ oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.Please refer to _http://www.db.com/en/content/eu_disclosures.htm_ for information (including mandatory corporate particulars) on selected Deutsche Bank branches and group companies registered or incorporated in the European Union. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
--
| <-- Date Index --> | <-- Thread Index --> |
Powered by MHonArc.
Copyright © 2006-2007, OW2 Consortium | contact | webmaster.