Problem in webservices SOAP
Hi All
iam new to webservices technology, i have downloaded a sample on DocumentStyle webserice and executed it as the per the instructions given the document and could succeed.
now on the same lines i have written the below service and tried to execute.
the steps what i followed are
1 written a service interface
2 written impl class which is as below
3 compiled and created ear file using config.xml file
4 started the oc4j server
5 deployed the generated ear file into the server
6 binded the service
7 Checked if the service is running by the following url
http://yourhost.com:8888/docws/validate
it is sucessful
8 prepared a jsp client
9 placed it in default-wep-app directory
10 opened the browser and called the jsp
it has displayed me with a html form where i have to give some input.
when clicked on submit
i did not call the service
so when i look at the server console
it says as follows
java.lang.IllegalArgumentException: Root element of a SOAP message must be: 'http://schemas.xmlsoap.org/soap/envelope/:Envelope'.
please any one help me how to trouble shoot the above.
i checked for the soap file in oc4j directory but failed.
please help me in fixing the above problem
import org.w3c.dom.*;
import oracle.xml.parser.v2.*;
import java.io.*;
public class ValidateServiceImpl implements ValidateService
public ValidateServiceImpl(){}
public Element validate(Element e){
Element processedEl=null;
try{
NodeList list = e.getChildNodes();
Node node = null;
String values [] = new String[list.getLength()-1];
for(int i=0;i<list.getLength();i++){
node = list.item(i);
values = node.getNodeValue();
int age = Integer.parseInt(values[0]);
int income = Integer.parseInt(values[1]);
int loanAmount = Integer.parseInt(values[2]);
String answer=null;
answer = checkAvailability(age,income,loanAmount);
processedEl = createElement(answer);
}catch(Exception ex){
ex.printStackTrace();
return null;
return processedEl;
private Element createElement(String value){
Document xmldoc = new XMLDocument();
Element e1 = xmldoc.createElement("answer");
xmldoc.appendChild(e1);
Text t = xmldoc.createTextNode(value);
e1.appendChild(t);
return (Element)xmldoc.getFirstChild();
private String checkAvailability(int age,int income,int loanAmount){
if((age>=20 && age <= 40) && (income > 2000) && loanAmount >= 10000){
return "true";
else{
return "false";
}
Hi Ramadhar,
If you are accessing the Webservice through the proxy you need to configure the proxy.
1. Follow the menu Path:
<b></b>System Administration>System Configuration>Service Configuration>Applications>com.sap.portal.ivs.httpservice>Services>proxy<i></i> and edit the property fields "HTTP-Enable Proxy Setting", "HTTP Proxy Host", and "HTTP Proxy port" and save.
2.Right click on "com.sap.portal.ivs.httpservice" node and choose "Administrate" and restart the service.
Hope this helps.
-Venkat Malempati
Similar Messages
-
Problem Consuming webservice -- SOAP UI
Hello Gurus,
We have generated a web service from SAP and trying to consume the web service from SOAP UI (external tool), but the SOAP UI tool is generating some error as mentioned below.
Exception_Name> CX_ST_MATCH_ELEMENT
Exception_Text> System expected end of element 'GetQueryViewData': Main Program:/1BCDWB/WSS0051118152402496573| Program:/1BCDWB/WSS0051118152402496573| Line: 58| Valid:X
Note: I have tested the web service from the WS Navigator and I am able to get the response (all Ok).
Kindly let me how I can fix the issue, I belief the problem is XML transformation related (XSLT_TOOL).
Regards,
Abhi.Hi Abhi,
seems that in SOAPUI, you need to pass the correct data (exact length of SAP Fields). Also try by removing "?" symbols whereever not necessary to pass data(optional values).
Hope this may help you...
Cheers,
Kris -
Problem with Webservice - XI - JDBC scenario
Hi Experts,
When I have tried to test the Webservice -> XI -> JDBC scenario with the mention address, I am getting the below error.
<b>Address :</b> http://<Host>:50100/XISOAPAdapter/MessageServlet?channel=:WEB_SERVICE:SOAP_CC&version=3.0&Sender.Service=WEB_SERVICE&Interface=http%3A%2F%2Fatl.com%2Ftar%5EMI_Outbound
<b>Error:</b>
<s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
<context>XIAdapter</context>
<code>RecoverableException</code>
<text><![CDATA[
com.sap.aii.af.ra.ms.api.RecoverableException: com.sap.aii.af.ra.ms.api.DeliveryException: Application:EXCEPTION_DURING_EXECUTE:
at com.sap.aii.af.mp.soap.ejb.XISOAPAdapterBean.process(XISOAPAdapterBean.java:919)
at com.sap.aii.af.mp.module.ModuleLocalLocalObjectImpl3.process(ModuleLocalLocalObjectImpl3.java:103)
at com.sap.aii.af.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:258)
JDBC Part works fine only problem with the SOAP sender side. Any suggestion please..
Regards
Sara
Message was edited by:
Sara DHi,
As per Bhavesh & Krishna's suggestion, I have changed the JDBC Data type. Now I could able to see the SXMB_MONI error too.
Latest error:
When I have tried to test the scenario using xmlApy, I am getting the below error.
<b>RWB error:</b>
2007-06-21 03:04:24 Success Receiver JDBC adapter: processing started; QoS required: BestEffort
2007-06-21 03:04:24 Success JDBC adapter receiver channel DB_CC: processing started; party , service DB_SERVICE
2007-06-21 03:04:24 Error Unable to execute statement for table or stored procedure. 'Address' (Structure 'STATEMENT') due to java.sql.SQLException: FATAL ERROR document format: structure 'STATEMENT', no key element found
<b>xmlSpy Error:</b>
<context>XIAdapter</context>
<code>RecoverableException</code>
<text><![CDATA[
com.sap.aii.af.ra.ms.api.RecoverableException: com.sap.aii.af.ra.ms.api.DeliveryException: XIAdapterFramework:GENERAL:com.sap.aii.af.ra.ms.api.DeliveryException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'Address' (structure 'STATEMENT'): java.sql.SQLException: FATAL ERROR document format: structure 'STATEMENT', no key element found
at com.sap.aii.af.mp.soap.ejb.XISOAPAdapterBean.process(XISOAPAdapterBean.java:919)
at com.sap.aii.af.mp.module.ModuleLocalLocalObjectImpl3.process(ModuleLocalLocalObjectImpl3.java:103)
at com.sap.aii.af.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:258)
I have mapped the EmpId in the mapping as well as in the DB the EmpId is Primary Key. Could you please tell me,what I am missing here?
Regards
Sara
Message was edited by:
Sara D -
Problems to execute SOAP message
Hi experts,
I have the following problem with this WSDL:
<wsdl:definitions targetNamespace="urn:MDirect" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:MDirect" xmlns:intf="urn:MDirect" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:message name="sendSmsWithSenderResponse">
<wsdl:part name="sendSmsWithSenderReturn" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="sendSmsWithSenderRequest">
<wsdl:part name="user" type="xsd:string"/>
<wsdl:part name="pwd" type="xsd:string"/>
<wsdl:part name="company" type="xsd:string"/>
<wsdl:part name="mobile" type="xsd:string"/>
<wsdl:part name="txt" type="xsd:string"/>
<wsdl:part name="sender" type="xsd:string"/>
</wsdl:message>
<wsdl:portType name="MDirectWS">
<wsdl:operation name="sendSmsWithSender" parameterOrder="user pwd company mobile txt sender">
<wsdl:input message="intf:sendSmsWithSenderRequest" name="sendSmsWithSenderRequest"/>
<wsdl:output message="intf:sendSmsWithSenderResponse" name="sendSmsWithSenderResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="MDirectWSSoapBinding" type="intf:MDirectWS">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="sendSmsWithSender">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="sendSmsWithSenderRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:MDirect" use="encoded"/>
</wsdl:input>
<wsdl:output name="sendSmsWithSenderResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:MDirect" use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="MDirectWSService">
<wsdl:port binding="intf:MDirectWSSoapBinding" name="MDirectWS">
<wsdlsoap:address location="https://www.xxx.com/mdirectws/services/MDirectWS"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
When running the request SOAP to the WebService I returned the following error:
soap fault: No such operation 'sendSmsWithSenderRequest'
Why only happens in SAP XI?
The tool tests WebService, SOAP-IU, works well.
Thanks,
Jose.Thanks friends,
I tried the following:
1 - The WSDL defines soapAction as follows: ...<wsdlsoap:operation soapAction=""/>...
Therefore, in Comm. Chan. type SOAP Receiver, he left the field SOAP Action without any value.
2 - He changed the soapAction of WSDL with the following value: ...<wsdlsoap:operation soapAction="urn:sendSmsWithSender"/>...
Therefore, in Comm. Chan. type SOAP Receiver, he left the field SOAP Action with the following value: urn:sendSmsWithSender
3 - He changed the soapAction of WSDL with the following value: ...<wsdlsoap:operation soapAction="sendSmsWithSender"/>...
Therefore, in Comm. Chan. type SOAP Receiver, he left the field SOAP Action with the following value: sendSmsWithSender
None of the three options I have worked. I continue to get the same problem. Does it make sense to modify the WSDL of a WebService?
Thaaanks, -
WebServices-SOAP interoperability
Hello All,
I need to develop a Java-system (client-side) that communicates over WebServices/SOAP with SAP (server-side).
Therefore, I am looking for using either Apache-Axis of Metro-WebServices to access the SAP system.
Therefore, I would like to know if there is somewhere an interoperability matrix identifying the frameworks that could function as WebServices clients or with which frameworks others have been successful?
regards, HarrieHi,
Thanks for the answer.
While using Axis1 I had problems with the namespace that SAP generates for its generated WSDL.
Axis 2 I tried, but failed on the client interface somewhere (not a SAP interoperability issue).
In the end I took Apache CXF and that works for me now.
Harrie -
Problem mx:WebService with ActionWebService
I have been using Flex Builder 3 for pretty often in my work.
Last week new Flex Builder 3 beta 3 came up, I installed new
Flex Builder 3 beta3.
This program was usually working on Flex Builder 3 beta2,
after I upgrade to beta3 to re-compile exact same program,
doesn't receive any values any more.
I believe this is bug on mx:WebService.
This is SOAP response example.
<?xml version="1.0" encoding="UTF-8" ?>
<env:Envelope xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns:env="
http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<env:Body>
<n1:SayHelloResponse xmlns:n1="urn:ActionWebService"
env:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/">
<return xsi:type="n1:MyStruct">
<rslt xsi:type="xsd:string">Hello, aaa</rslt>
</return>
</n1:SayHelloResponse>
</env:Body>
</env:Envelope>
Server side program is create by Ruby on Rails,using
ActionWebService. This program is sending SOAP response that
contains a struct. But,in Flex builder 3 beta 3's mx:WebService
event.result doesn't receive any data. It seems recognize and
events are happening, but inside value is always come up with
"null".
Thank you.The best way to get help with WebService issues is to log a
bug in JIRA against the Flex SDK:
http://bugs.adobe.com/flex/
When logging WebService issues, be sure to include the WSDL,
any schema imports, a snippet of how the request is being made if
there's a problem encoding the SOAP request, and a capture of the
HTTP SOAP response XML if there's a problem with decoding (as there
appears to be in your scenario below).
I'd check the type of your event.result first. Make sure that
you're not casting your result with the as operator to an
incompatible type because you'll just get null instead of a
coercion error. -
Problem creating webservice from existing code in sjse8
I have a java class with three methods in an enterprise app (no ejbs) that I want to expose with webservice. In sudio5 I had no problem with webservice creation but in studio8 when I chose "From scratch, Use existing code", it gives me the opting to go to my class and select those methods. When I click finish, it generates an Implementation class that has declaration for my java class repeated 3 times which is obviously wrong and under it says:
// Enter web service operations here. (Popup menu: Web Service->Add Operation)
The class is empty.
I choose "rpcliteral", "strict", "useonewayoperations" and "donotoverride" under web module property / webservice.
And as you can guess it generates a wsdl file with no webservice methods info.
I have and am checking all forums and searching different sites but haven't fond anything yet.
I appreciate any help resolving this issue.Seems this feature doesn't work properly in jse and completely removed from latest nb55 enterprise pack (only session enterprise bean case remain)
-
File(PDF as attachment)-- XI-- WebService(SOAP with attachment)
Hi i have following Scenerio in my hand,
File>XI>WebService(SOAP)
Kindly help me in implementing the Following Scenerio;
I need to attach PDF to File Adapter as PayLoad or give it to File Adapter as Attachment which in turn send this data to XI and then XI wud generate WebService having this PDF as attachment.
Kindly Walk me thru all the steps during Configuration and design and do guide me how to test wether this scenerio works or not.
Also tell me abt the WebService i need to use to test the Scenerio.
Thanks.Hi Jeet,
If you want your file adapter to read contents from a PDF file, check out the folloing blog,
<a href="/people/sap.user72/blog/2005/07/31/xi-read-data-from-pdf-file-in-sender-adapter">Sender File Adapter with PDF</a>
If you want your file adapter to generate its output into a PDF file, then check the following blog,
<a href="/people/sap.user72/blog/2005/07/27/xi-generate-pdf-file-out-of-file-adapter">Receiver File Adapter With PDF</a>
Sriram's blog on FILE to HTTP scenario might of be help to you too. It also deals with Syn / Async Bridge which can be ignored.
<a href="/people/sriram.vasudevan3/blog/2005/01/11/demonstrating-use-of-synchronous-asynchronous-bridge-to-integrate-synchronous-and-asynchronous-systems-using-ccbpm-in-sap-xi">File to HTTP</a>
Do let us know if you need any further help,
regards,
Bhavesh -
R3 (rfc-sender) - XI - Webservice ( soap-receiver)
Hi,
I am getting below error whenever webservice(target system) is unavailable.
HTTP 404 Not Found
Then RFC got failed in R3, due to this error in XI
R3 (rfc-sender) <-> XI <-> Webservice ( soap-receiver) Synch
User will enter the request data in R3 and waiting for the response, but webservice is down(i.e not available)
Request is reached to XI box and XI is trying to send data when webservice is down( i,e not available), RFC is waiting for the response from XI box.
how we will handle this kind of situation,how should i give response back to RFC( because RFC sent the request and waiting for the response, XI could not send any response back as Webservce is down, Please advice me how should XI inform to the end user r R3 abt webservice.
I am getting this error to my mail box as i have configured ALERTS. i do not want to change existing RFC.
is there any chance to send response to R3 even webservice is down, please can any one suggest.
Thanks,
SIva
Edited by: Siva Grandhi on Jun 18, 2008 1:12 PMHi siva,
check this blog on HTTP errors.
/people/krishna.moorthyp/blog/2006/07/23/http-errors-in-xi
May be the URL you have given in SOAP at receiver adapter is wrong.Check that once.
Error: 404 Not Found
Description: The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.
Possible Tips:- for HTTP_RESP_STATUS_CODE_NOT_OK 404
u2022 404 is an HTTP response code that indicates that the resource in question couldn't be found. Usually this is due to an incorrect URL, so it is better to cross check all URLs. Check pipeline URL in the SLD in the business system of the Integration Server For this go to SLD->Business System-><yourIntegrtaion Server>->Pipeline URL: It should be like this http://<host>:<port>/sap/xi/engine?type=entry Where host is the host name of the Integration Server and port is the HTTP(8xxx) port. To verify this in Integration Server you can do like this. Go to SXMB_ADM->Integration Engine Configuration->Choose Edit from Menu -> Change Global Configuration Data to switch to change mode. Then select System Landscape - Load Configuration. (This is not required always)
u2022 Check that the port really is the ICM HTTP Port and not the J2EE port i.e SMICM then menu GOTO --> SERVICES and check the port number for HTTP. It should be HTTP port
u2022 If the error is Page cannot be displayed, cannot find server in https configurations Check and correct the SSL configuration for the ABAP and the J2EE side of the system
u2022 If the error is because of integration server when using Proxy communications then check these. i.e SXMB_ADM->Integration Engine Configuration->Corresponding Integration Server enrty should be dest://<Http Integration server-Destination> Where < Http Integration server -Destination > is the RFC destination (SM59) of type HTTP connection (type H) to the Integration Server. In this case, host name, port, and path prefix are saved in the RFC destination.
Thanks,
Vijaya. -
R3 (rfc-sender) - XI - Webservice ( soap-recever) Synch : error handlng
R3 (rfc-sender) <-> XI <-> Webservice ( soap-receiver) Synch
User will enter the request data in R3 and waiting for the response, but webservice is down(i.e not available)
Request is reached to XI box and XI is trying to send data when webservice is down( i,e not available), RFC is waiting for the response from XI box.
how we will handle this kind of situation,how should i give response back to RFC( because RFC sent the request and waiting for the response, XI could not send any response back as Webservce is down, Please advice me how should XI inform to the end user r R3 abt webservice down.
Pleae help me out on this.
Thanks,
Dhanush.Hi,
Normally, the Web service should provide a fault message back to XI and the RFC should also have an exception defined that will trigger a fault message mapping and that way the application error is sent back to R3.
But if the web service does not provide u with a fault message then XI will trigger the System Error back to R3.
The functionality of checking the DB status and propagating meaningful errors to XI as fault messages should lie with the web service.
Thanks
Vikranth -
Hello,
i have some Problems with WebServices.
When I call my function how makes the request (get_frob), it goes back to the main program and make a print! After that my request starts!
I want that the request finished first and then make a print!
I need threats for this???and how does it work?
My englisch is not so good I´m sorry for that!
Please help me
Thanks
Chris
def Button_Autorisieren:SwingButton=SwingButton{
text:"Autorisieren"
width:100
translateY:150
action:function()
var Authentication:HTTP_Authentication=new HTTP_Authentication();
Authentication.get_frob();
java.lang.System.out.println(Authentication.abfrage);
public class HTTP_Authentication {
var api_key:String="***********";
var secret_key:String="***********";
var stat:String;
var sig:String;
var frob:String;
var method:String;
var md5_String:String;
var perms:String;
var api_sig:String;
public var abfrage:Boolean;
public var link:String;
def md5:MD5=new MD5();
var parser = PullParser{
documentType: PullParser.XML;
onEvent: function(event: Event) {
if (event.type == PullParser.START_ELEMENT ) {
if(event.qname.name == "rsp" and event.level==0)
stat=event.getAttributeValue(QName{name:"stat"});
if (stat=="ok")
if(event.type==PullParser.END_ELEMENT)
if(event.qname.name == "frob")
frob=event.text;
java.lang.System.out.println("Frob: {frob}");
abfrage=true;
public function get_frob ()
method="flickr.auth.getFrob";
md5_String="{secret_key}api_key{api_key}method{method}";
java.lang.System.out.println(md5_String);
sig=md5.makeMD5(md5_String);
java.lang.System.out.println(sig);
var request = HttpRequest {
location: "http://api.flickr.com/services/rest/?method={method}&api_key={api_key}&api_sig={sig}"
method: HttpRequest.GET
onInput: function(input: java.io.InputStream)
parser.input=input;
parser.parse();
input.close();
}.enqueue();
}Hello,
thank you for your answer. It was my mistake, I discribe the problem very bad.
When i call the function get_frob(). Netbeans goes in the function and run through the end but nothing happened
onMouseClicked: function( e: MouseEvent ):Void {
test=Authentikation_Frob.get_frob();and in my if clausel there will be a wrong output! After the output my programm go back to the function get_frob() and then make the request and go back to the if clausel. Now everything ist correct. But why does my programm need 2 runs ????thats not correct!!
Thank you!!
if (test==true)
var Authentikation_Link:HTTP_Authentication_Link=new HTTP_Authentication_Link();
link=Authentikation_Link.get_link();
var uri = new java.net.URI("{link}");
var desktopClazz = java.lang.Class.forName("java.awt.Desktop");
var getDesktopMethod = desktopClazz.getMethod("getDesktop");
var desktop = getDesktopMethod.invoke(null);
var browseMethod = desktopClazz.getMethod("browse", [uri.getClass()] as java.lang.Class[]);
browseMethod.invoke(desktop, uri);
else
fehler_ausgabe.visible=true;
fehler_ausgabe.content="Fehler {Authentikation_Frob.frob_fehler} {Authentikation_Frob.frob_hilfe}";
}Edited by: Esco24 on Aug 10, 2009 1:02 AM -
Problem accessing Webservices from Flex
Hi All,
I have created a Webservice in Abap and configured it using
SOAMANAGER transaction. I am able to succesfully test the Web serivice which I have created in 'Soamanager ' transaction.
But when I am calling this Webservice from Flex application I am getting an error as " FAULT : faultCode:WSDLError faultString:'Runtime exception Error #1009' faultDetail:'null' "
We tried calling the Webservice outside SAP from the FLex application, it is working fine.
Please let me know how to rectify this error . It's an urgent requirement.
Thanks and regards,
Uma.hi
when you create your destinations for your webservices in the SOAMANAGER-> Destination Template
you would be providing wsdl url and destination , and in the below you can
find the username and pwd that need to set , you need to select the radio buttons with logon tickets ,
username , password , there , re-check the username and pwd by selecting the radio button with selecting the
radio button username password , and even check the webservice in the WSNAVIGATOR , whether its working
fine , and other thing is there is situation where your webservice may work fine inthe wsnavigator even then there would
be some problem inthe webservice , even check this scenario.
Thanks -
Hi,
late but hopefully not to late i do my first steps into the world of webservices.
Since we use JDEV 9.0.4 in prodution i started with this version of JDEV.
There it is possible to generate two kind of Webservices, soap and j2ee.
In version 10.1.3 there is only one left.
May someone could explain the reason to me please (and perhaps the differences)?
Thanks and regards,
ChrisIn 10.1.3 we use the standard J2EE way of working with Web Services (JAX-RPC) in older versions of JDeveloper we also supported an Oracle specific way - which was there before the industry standard appeared.
-
WebService SOAP response problems
hey,
I'm developing a WebService, using EJB's. I have a session bean, which has several methods. One of them returns, say, a class like follows:
class TeamDTO implements Serializable {
private String name;
private Integer teamId;
//getters and setters ..
I have several such methods returning various, very similar, classes. Now the problem is, when I try to test my application in the Web Services Navigator the response NEVER contains all the fields I wish. Why is that? Example of a response:
<SOAP-ENV:Envelope ...>
<SOAP-ENV:Body>
<rpl:getAllTeamsResponse ... >
<rpl:Response ...>
<pns:TeamDTO>
<pns:name>team0</pns:name>
</pns:TeamDTO>
</rpl:Response>
</rpl:getAllTeamsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
But the TeamDTO class has apart from a name field an teamId field as well. What happened?! The same happens to other classes, but there's no rule about the missing column (first I thought it's the PK, like in the above example, but that's not the case).
What am I doing wrong? Ah, the fields are definetely not null, since in the above case it's a PK.
regards,
KornelHey,
thanks for your hint, but that's not the problem here - for the example I've posted above java.lang.Integer won't appear, and for another case java.lang.String (whereas in my example String appeared). I'm sure the problem is somewhere else.. What happens if the field is null, will the appropriate tag appear in the soap response?
regards,
Kornel -
WLS7 WebServices SOAP with attachments problem
I have implemented a WebService in Weblogic. If I use the standard Sun
JAXM library to invoke the service without any attachments, it works
fine. However, if I use the standard JAXM functionality to add a gif
image to the message, Weblogic throws an exception (attached below)
before it even invokes the handler class for my Web Service.
Basically, the JAXM library does not insert the "start=..." element in
the top level "Content-Type" HTTP header field. Should Weblogic cope
with this, or is it not designed to work with the Sun JAXM library. I
am using the latest version of the Sun WebServices Developers Kit and,
hence, the latest version of the JAXM library. Do BEA recommend a
different client library be used to invoke Weblogic WebServices? If
so which one(s) are supported?
I have another question. Assuming I can find a client which will
deliver to Weblogic an HTTP SOAP mesage that it considers to be valid,
how do attachments get passed to the "component" class? I understand
how I could iterate through the mime segments / attachments from
within the "handler", but I don't understand how / if attachments are
passed onto the actual component class. Reading from the FAQ:
Q. Does WebLogic Server 7.0 support SOAP Messages with Attachments?
A. Yes. As long as the data type of the attachment is on the list of
supported JAX-RPC data types, then WebLogic Server will automatically
handle parameters to Web services that are SOAP attachments. If you
want to do further processing of the attachment, you can use handlers
to intercept the request and response SOAP message (which includes the
attachment.)
I get the impression that attachments are "magically" available to
code within the component, but I don't understand the actual mechanics
of this.
Any thoughts would be gratefully received.
Cheers,
Steve
javax.xml.soap.SOAPException: No start attachment specified in the
Multipart/Rel
ated document
at weblogic.webservice.core.soap.SOAPMessageImpl.handleMimeMessage(SOAPM
essageImpl.java:174)
at weblogic.webservice.core.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.
java:118)
at weblogic.webservice.core.soap.MessageFactoryImpl.createMessage(Messag
eFactoryImpl.java:27)
at weblogic.webservice.binding.soap.HttpServerBinding.receive(HttpServer
Binding.java:50)
at weblogic.webservice.core.DefaultWebService.invoke(DefaultWebService.j
ava:216)
at weblogic.webservice.server.servlet.ServletBase.serverSideInvoke(Servl
etBase.java:362)
at weblogic.webservice.server.servlet.WebServiceServlet.serverSideInvoke
(WebServiceServlet.java:269)
at weblogic.webservice.server.servlet.ServletBase.doPost(ServletBase.jav
a:346)
at weblogic.webservice.server.servlet.WebServiceServlet.doPost(WebServic
eServlet.java:237)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:1058)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:401)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:306)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:5412)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
eManager.java:744)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:3086)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2544)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
<08-Jan-03 15:22:54 GMT> <Error> <HTTP> <101017>
<[ServletContext(id=2655643,nam
e=mms_service_05.war,context-path=/mms_service_05)] Root cause of
ServletExcepti
on
javax.xml.soap.SOAPException: No start attachment specified in the
Multipart/Rel
ated document
at weblogic.webservice.core.soap.SOAPMessageImpl.handleMimeMessage(SOAPM
essageImpl.java:174)
at weblogic.webservice.core.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.
java:118)
at weblogic.webservice.core.soap.MessageFactoryImpl.createMessage(Messag
eFactoryImpl.java:27)
at weblogic.webservice.binding.soap.HttpServerBinding.receive(HttpServer
Binding.java:50)
at weblogic.webservice.core.DefaultWebService.invoke(DefaultWebService.j
ava:216)
at weblogic.webservice.server.servlet.ServletBase.serverSideInvoke(Servl
etBase.java:362)
at weblogic.webservice.server.servlet.WebServiceServlet.serverSideInvoke
(WebServiceServlet.java:269)
at weblogic.webservice.server.servlet.ServletBase.doPost(ServletBase.jav
a:346)
at weblogic.webservice.server.servlet.WebServiceServlet.doPost(WebServic
eServlet.java:237)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:1058)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:401)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:306)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:5412)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
eManager.java:744)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:3086)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2544)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
>
import javax.activation.DataHandler;
public class EchoAttachmentService implements com.bea.jws.WebService
static final long serialVersionUID = 1L;
* @common:operation
* @jws:protocol form-get="false" form-post="false"
public String echoAttachment(DataHandler dh)
return("***Service received DataHandler of type: " + dh.getContentType());
Error Description:
ERROR: EchoAttachment.jws:19: Java type DataHandler is unsupported over a web
service.
SUGGESTION: Use a supported type such as a class with public fields, a JavaBean,
a primitive type, String, BigInteger/BigDecimal, Calendar, GDate/GDuration, QName,
URI, byte[], or an XMLBeans type.
Maybe you are looking for
-
IMac not reading Cd's...but DVD's ok.
I realize this is not new. I have been reading as many posts as I can, w/many people listing thru iTunes. I have tried, & so has everyone else that I have read, just about everything. Maybe it is just me. But I am not sure it has to do w/iTunes as mu
-
iam using spry to validate controls in a popup.in that validations are working fine but the problem is when we click cancel button also thse validations are firing... i am using javascript:Spry.Widget.Form.destroyAll() to destroy validations...but it
-
Creative programs will install but will not open with same error message
Hello guys thanks for any help you can provide. I installed creative cloud and install a few programs. None of the programs will open and I receive the same error message for each one. Adobe Premiere Pro CC 2014 cannot be opened because of a problem.
-
i've read and re-read instructions on how to do so, and feel like i've done it correctly, but I can't locate the actions in my program. What am I doing wrong? Thanks in advance!
-
Using -client or -server by default
I'm using JDK1.3.1. I would like to know 1) will the hotspot turn on automatically when using "java" with any option 2) if yes, it is using -client or -server? Thanks. Frank