XML document as a parameter while accessing web service
I have web service which has to retuen an XML document (org.w3c.dom.Document) as
a paramter. Since this is not a supported data type for in-out paramaters, I will
have to serialize and write my own converter. What is the best solution? Is there
any class/library that can convert the document into String which I can return
as a parameter and again get create a XML document in the client side.
Thanks -Surya
Is the Document well defined via schema? You might be able to use the autotype
ant task to generate a serializer.
Otherwise, serialize the document to a string, then wrap it in <[CDATA[...]]>
on the return. The calling app will need to understand that the string is xml,
and then desrailize it manually.
Mike
"Surya" <[email protected]> wrote:
>
I have web service which has to retuen an XML document (org.w3c.dom.Document)
as
a paramter. Since this is not a supported data type for in-out paramaters,
I will
have to serialize and write my own converter. What is the best solution?
Is there
any class/library that can convert the document into String which I can
return
as a parameter and again get create a XML document in the client side.
Thanks -Surya
Similar Messages
-
Exception while accessing web service through code
I have a web service developed using AXIS deployed on Weblogic 8.1
Another web application cotaining GUI deployed on Weblogic 10 tries to access this web service through code.
This piece of code to invoke the web service is written in Action Class present inside web application. (Struts is used in GUI based web app)
When the code tries to invoke web service I am getting following error.
(401)Unauthorized xxx
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:630)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:128)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
at org.apache.axis.client.Call.invoke(Call.java:2553)
at org.apache.axis.client.Call.invoke(Call.java:1753)
at com.ebv.app.web.action.UCS77_1ProcessOfficialChangeSaveDetailsAction.invokeAx(UCS77_1ProcessOfficialChangeSaveDetailsAction.java:243)
at com.ebv.app.web.action.UCS77_1ProcessOfficialChangeSaveDetailsAction.callUCS77_1ProcessOfficialChangeWebService(UCS77_1ProcessOfficialChangeSaveDetailsAction.java:173)
at com.ebv.app.web.action.UCS77_1ProcessOfficialChangeSaveDetailsAction.processAction(UCS77_1ProcessOfficialChangeSaveDetailsAction.java:133)
at com.ebv.framework.web.action.EBVAction.execute(EBVAction.java:106)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
The web service URL is as follows:
http://10.140.96.5:7808/services/ucs77_1/ProcessOfficialChangeSave77_1-v0001.soap
However
When I try to hit the webservice URL directly on browser login window appears where same username/password I provide which are passed in code to invoke the web service. I get the success page indicating that web service is invoked on hitting enter.
The method used in UCS77_1ProcessOfficialChangeSaveDetailsAction.java to invoke web service is as follows:
public String invokeAx
String xmlMessage,
String webServiceURL,
String webServiceOperation,
String username,
String password)
String xmlResponse = null;
Call webServiceCall = null;
InputStream input = new ByteArrayInputStream(xmlMessage.getBytes());
Service service = new Service();
try
webServiceCall = (Call) service.createCall();
SOAPEnvelope env = new SOAPEnvelope(input);
SOAPEnvelope resEnv = null;
webServiceCall.setTargetEndpointAddress(new URL(webServiceURL));
webServiceCall.setOperationName(new QName(webServiceOperation));
webServiceCall.setUsername(username);
webServiceCall.setPassword(password);
try
resEnv = webServiceCall.invoke(env);
catch (AxisFault e)
e.printStackTrace();
Message responseMessage = webServiceCall.getResponseMessage();
SOAPEnvelope soapXml = (SOAPEnvelope) responseMessage.getSOAPEnvelope();
xmlResponse = new String(soapXml.toString().getBytes(AppConstants.UTF8),AppConstants.UTF8);
if (xmlResponse == null)
xmlResponse = resEnv.toString();
catch (Exception e1)
e1.printStackTrace();
return xmlResponse;
Both the weblogic server reside on two different AIX machines.
Can anybody tell what's the problem while invoking web service through code?time to look into the gateway logs as stated by the fault ..
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode xmlns:p="http://schemas.oblix.com/ws/2003/08/Faults">c</faultcode><faultstring>Step execution failed with an exception</faultstring><detail></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
looks like the cipher step might have failed -
Error while accessing web service
I have a web service (EJB).
After generating clients from wsdl file, while i am trying to access the corresponding function from the client, i am getting the following error.
javax.xml.ws.soap.SOAPFaultException: Endpoint {http://data.module.bill.company.net/}DataService does not contain operation meta data for: {http://www.w3.org/2001/04/xmlenc#}EncryptedData
I dont know why it happens.
Can anyone please help me.
Thanks in Advance...Hi Aseem,
how are you doing ?
Authorizations in portal are user specific.
The current problem is due to the user not having sufficient permissions on the back end to execute the call.
for this check :-
1> the current user in portal
2> mapping to user in the back end
3> back end user permissions for the RFC / BAPI & it's dependant objects
with respect,
amit -
Exception while accessing web service secure through web services Manager
Hi All,
I deployed sime Hello World web service on JWSDP1.6 and secure it through web service manager(gateway) using Certificate based security.But when I try to access this web service using JWSDP client,I got the following Error while monitoring the soap messages through TCP-Monitor:
/////////////////////////////////Request///////////////////////////////////////////////////////////////
POST /gateway/services/SID0003009 HTTP/1.1
Content-Type: text/xml; charset=utf-8
Accept: text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Content-Length: 5631
SOAPAction: ""
User-Agent: Java/1.5.0_05
Host: ivy.cs.ucl.ac.uk:8082
Connection: keep-alive
<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="http://hello.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><env:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" env:mustUnderstand="1"><xenc:EncryptedKey xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/><ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<wsse:SecurityTokenReference>
<wsse:KeyIdentifier EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier">eN9famBBWzHNUIwWRhMPktcM+VQ=</wsse:KeyIdentifier>
</wsse:SecurityTokenReference>
</ds:KeyInfo><xenc:CipherData><xenc:CipherValue>MHjtgA4wOtvI1B+SuRVEmD07yE+jl6axd4XbJ0nvQ3EzSuVVoST9vHzURh+B47yj41187s8T+yjt
Bmpk9OB278Jghonkacv6r+q+LVlxRrQDudNGir7plzFeM6bUadMxf+FLgn5O0a44vU/tvy6V9+zi
yqFdhTvS21No/aW62No=</xenc:CipherValue></xenc:CipherData><xenc:ReferenceList><xenc:DataReference URI="#XWSSGID-1155126003241-1198323932"/></xenc:ReferenceList></xenc:EncryptedKey><wsse:BinarySecurityToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" wsu:Id="XWSSGID-11551260018331598979688">MIIC3TCCAkagAwIBAgIBATANBgkqhkiG9w0BAQQFADBJMQswCQYDVQQGEwJVUzEMMAoGA1UECBMD
U0NBMQwwCgYDVQQKEwNTVU4xHjAcBgNVBAMTFWNlcnRpZmljYXRlLWF1dGhvcml0eTAeFw0wNjAz
MTkxMzQ5MDJaFw0xNjAzMTYxMzQ5MDJaMEcxCzAJBgNVBAYTAlVTMQwwCgYDVQQIEwNTQ0ExDDAK
BgNVBAoTA1NVTjEcMBoGA1UEAxMTeHdzLXNlY3VyaXR5LWNsaWVudDCBnzANBgkqhkiG9w0BAQEF
AAOBjQAwgYkCgYEAzNDPKUz1MhUH1LsrLqXKxciOKSWeTrdoe/SVwe/4uy5eobAWSsSTposaOYFy
uxf3cGCCIs7u0jMAXLQ9jzobDbt9XQ4tXPoBzKKzS+yU6hDk2TcOCkioeT9A9db5LF8yevhwXKB4
AJ1Eh//Dp/djoonXCCxsxupQZp3ueRJrR98CAwEAAaOB1jCB0zAJBgNVHRMEAjAAMCwGCWCGSAGG
+EIBDQQfFh1PcGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZpY2F0ZTAdBgNVHQ4EFgQUECH05VC3/WGW
H4AGD6tnH0h+kFUweQYDVR0jBHIwcIAUdry1wGRZ2fyJSKisVSxpMEmIiaahTaRLMEkxCzAJBgNV
BAYTAlVTMQwwCgYDVQQIEwNTQ0ExDDAKBgNVBAoTA1NVTjEeMBwGA1UEAxMVY2VydGlmaWNhdGUt
YXV0aG9yaXR5ggkA4HaEvd6hq8YwDQYJKoZIhvcNAQEEBQADgYEA0RhOk67pCrO6MgZZGqrmAMW6
76fZowBxTKlFq88nrf8v1MUxV8H9wgbTDrwR0HtxY3TGpDFw2tNAww2pyDX/pQ2Wt46ichluGxjf
aEV53loKTOM7syAmlicWqViGzBfgzriIl918TzFaX9BD/Y55bKZQk057maBCSkUuFfF453s=</wsse:BinarySecurityToken><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"><InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="wsse enc env ns0 xsd xsi"/></ds:CanonicalizationMethod><ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><ds:Reference URI="#XWSSGID-1155126002593447652186"><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><ds:DigestValue>UJ1kuwI+WuF/RkrQpZrj1GvraLI=</ds:DigestValue></ds:Reference><ds:Reference URI="#XWSSGID-1155126002602761294100"><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><ds:DigestValue>sKG/z5OIGgqJ2nw7JtpXyJzr8pY=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>SBc65VTG1xpEkRUTz70H0fVGIgoBJ0QnNad0k07RMSfw4vG1WHJdt19R05pO2AvU5aoYuBSaguJe
ZGEjmWzw8mnSWKBi+zeDMeJiwgqwW6HHHX9P7JDslxuTIqoJIVUbSjUTSVz6ww8siIK65quXdkMT
ZzLfp7Cd0gBuA3EEZpg=</ds:SignatureValue><ds:KeyInfo><wsse:SecurityTokenReference xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="XWSSGID-11551260025411896275738">
<wsse:Reference URI="#XWSSGID-11551260018331598979688" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
</wsse:SecurityTokenReference></ds:KeyInfo></ds:Signature><wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="XWSSGID-1155126002602761294100"><wsu:Created>2006-08-09T12:20:02Z</wsu:Created><wsu:Expires>2006-08-09T12:20:07Z</wsu:Expires></wsu:Timestamp></wsse:Security></env:Header><env:Body xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="XWSSGID-1155126002593447652186"><xenc:EncryptedData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" Id="XWSSGID-1155126003241-1198323932" Type="http://www.w3.org/2001/04/xmlenc#Content"><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/><xenc:CipherData><xenc:CipherValue>XNqEzHNp47ILtOagAUNCXYkxOCWv4CjHqmZ7j6VKN/NO96ce4BsNSL6lKzqa9dPxHB1sTVGZQ8KA
COQ6DGwyWCP8ip+CU2hor3uUAml7nzHTx1LUw3Db+0p31VAT3EqKJA3aFy38GQrBTr9ojMOUA6tm
Cj71yucN3UCKRUl3RpE8qU68y7AwNxPsyAZeSa2AVm2cmWvSDZlxgMsx+JCEZaf3+D0o1zMp0Fxb
MSISPt/JrEolt1H5UM1AoFGU4QkckWrQNLPyEF9oxEgZ8oCE5U8v/YJwZIAHFrx67XfaLwQLjzXw
VPigsH9gLkfbP2BU8Vp31GsPwBZtUeNz9S35+CZPD7EiqoAB1QuAxZkJV7n00VChYH+scT64tNja
c81bcD8tf4sAr7toCMNDAU6+74+Qy0EyPqgwLtotDxErn4kF8e72cONMMQBQ91tQs+iI+D6C1I6+
f9UiSfgtm/MTuKQK1CRqarEtI9N6lpqVH8k7ulUwH/jFstihxmhMJ3aZY+qQgSwSs3pwSSim+e18
eR7dOEq4vG8ivKuGvTDO4sSV2RP/nL/3eXr0y7eM0kMFKwTUA4JqL4Y/l8Bo/rie/ZXkkbF6hwEu
dX1QmB0gf5k=</xenc:CipherValue></xenc:CipherData></xenc:EncryptedData></env:Body></env:Envelope>
////////////////////////////////Response///////////////////////////////////////////////////////////////
HTTP/1.1 100 Continue
Server: Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)
Date: Wed, 09 Aug 2006 12:28:47 GMT
HTTP/1.1 500 Internal Server Error
Date: Wed, 09 Aug 2006 12:28:47 GMT
Server: Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)
Connection: Keep-Alive
Keep-Alive: timeout=15, max=100
Content-Type: text/xml
Transfer-Encoding: chunked
157
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode xmlns:p="http://schemas.oblix.com/ws/2003/08/Faults">c</faultcode><faultstring>Step execution failed with an exception</faultstring><detail></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
0
So basically, what I am doing here as follows:
HelloClient(using JWSPD1.6)->gateway(web service manager for securing the web service using message level security through certificate )->helloservice(deployed using JWSDP1.6)
I would appreciate if someone could tell me the cause of this errror.Thanks.
Kashiftime to look into the gateway logs as stated by the fault ..
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode xmlns:p="http://schemas.oblix.com/ws/2003/08/Faults">c</faultcode><faultstring>Step execution failed with an exception</faultstring><detail></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
looks like the cipher step might have failed -
Error while accessing Web services
Hi,
I have installed & configured Siebel 8.2 on windows 2008 R2 with IIS as Web server.
When i try to connect through IE using URL "http://localhost/eai_enu/start.swe?SWEExtSource=WebService&SWEExtCmd=Execute" I get an error such as - Server Error in Application "DEFAULT WEB SITE/EAI_ENU".
Can you please help me understand this problem?
Below if additional information from IE error page.
Detailed Error Information -
Module - IsapiModule
Notification - ExecuteRequestHandler
Handler - AboMapperCustom-25584
Error Code - 0x800700c1
Requested URL - http://localhost:80/eai_enu/start.swe?SWEExtSource=WebService&SWEExtCmd=Execute
Physical Path - c:\siebel\8.2.2.0.0\sweapp\public\enu\start.swe
Logon Method - Anonymous
Logon User - Anonymous
Failed Request Tracing Log Directory - C:\inetpub\logs\FailedReqLogFiles
Over here I could find that physical path " c:\siebel\8.2.2.0.0\sweapp\public\enu\start.swe" doesn't really have any file named start.swe.
I have applied SWSE logical profile on webserver.
Thanks,
HarshalHi,
this url is used to external system access Siebel Web Services. If you can generate a WSDL, you need access Siebel applications using url, http://localhost/callcenter_enu/start.swe for example, navigate to Application - Web Services, in Inbound Web Services, selected the WSDL and generate a WSDL file.
If you can import a external WSDL, you need get a WSDL file from third system and import to Siebel using Siebel Tools.
Regard. -
NullPointerException in WebLogic while accessing web service from client
Hi all,
I have an SPML Web Service developed. The java class from WSDL was generated using wsdlc
<wsdlc srcWsdl="schema/oracle_ws_spmlv2.wsdl" destJwsDir="${classes.dir}" type="JAXWS" explode="true"/>
and then
<jwsc classpath="..." classpathref="wls.jars" srcdir="src/main" destdir="${classes.dir}" keepGenerated="yes">
<jws file="com/oracle/xmlns/idm/identity/webservice/spmlservice/SPMLService_SPMLServiceProviderSoapImpl.java" compiledWsdl="target/oracle_ws_spmlv2_wsdl.jar" type="JAXWS">
<WLHttpTransport contextPath="OIMSPMLWebService" serviceUri="${ear.deployed.name}" portName="SPMLServiceProviderSoap"/>
</jws>
</jwsc>
I have deployed the ear in WLS and generated the client classes.
<clientgen wsdl="http://${weblogic.host}:${weblogic.port}/OIMSPMLWebService/OIMspmlxsd?WSDL" destDir="${classes.dir}" type="JAXWS"/>
I run the client using java command from the terminal. First time, it runs fine. I get a valid response. But often, when I run it a second time, I get the following exception ... I need to undeploy and deploy the ear again. Any help will be appreciated!
Following error appears.
Error 500--Internal Server Error
java.lang.NullPointerException
at weblogic.wsee.jaxws.JAXWSDeployedServlet.init(JAXWSDeployedServlet.java:49)
at javax.servlet.GenericServlet.init(GenericServlet.java:241)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
at weblogic.servlet.internal.StubLifecycleHelper.(StubLifecycleHelper.java:48)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:521)
at weblogic.servlet.internal.ServletStubImpl.checkForReload(ServletStubImpl.java:452)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:232)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:202)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3588)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2200)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2106)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1428)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)As a workaround I can start the application in debug mode, log into the Weblogic console and stop then restart the deployment and this issue goes away, sort of a pain but it does work.
-
UTL_DBWS, XML Document as a parameter
I'm struggling with using a fully formed xml document as a parameter to a web service.
Using this code I'm able to connect to the web service and sans the arg1 argument everything works.
When I as in the code below use xmltype.toStringValue() or xmltype.toClobValue() charachters like < and > is replaced with the html encoded version (< and >) which does'nt work very well with the recieving web service.
All three parameters is defined as string on the recieving web service.
I've been searching this forum and using google, but can't find any examples doing something like this.
Any help or pointers appreciated.
procedure forwardToQueue is
svc_ sys.utl_dbws.service;
call_ sys.utl_dbws.call;
svc_qname sys.utl_dbws.qname;
response sys.xmltype;
request sys.xmltype;
utMelding sys.xmltype;
t1 sys.xmltype;
t2 sys.xmltype;
doc xmldom.DomDocument;
fListe xmldom.DOMNodeList;
tmpL xmldom.DOMNodeList;
fElement xmldom.domNode;
tmp xmldom.domNode;
meldingId strliten;
arg0_node xmldom.domnode;
arg0_elmt xmldom.domelement;
arg0_text xmldom.domtext;
arg1_node xmldom.domnode;
arg1_elmt xmldom.domelement;
arg1_text xmldom.domtext;
arg2_node xmldom.domnode;
arg2_elmt xmldom.domelement;
arg2_text xmldom.domtext;
child_doc xmldom.domdocument;
main_node xmldom.domnode;
root_node xmldom.domnode;
root_elmt xmldom.domelement;
x sys.xmltype;
c varchar2(32000);
bs_chr strmax;
l_service sys.UTL_DBWS.service;
l_call sys.UTL_DBWS.call;
l_result ANYDATA;
l_wsdl_url strmax := 'http://salah-test.sismo.local:8080/SIMSEJB/SIMSFacadeBean?wsdl';
l_namespace strmax := 'http://salah-test.sismo.local:8080/SIMSEJB/SIMSFacadeBean';
l_service_qname sys.utl_dbws.qname;
begin
procName := 'hentQueue';
pl('*************** '||procName||' ***************');
svc_qname := sys.utl_dbws.to_qname(null, 'SIMSFacadeBeanService');
svc_ := sys.utl_dbws.create_service(svc_qname);
call_ := sys.utl_dbws.create_call(svc_);
sys.utl_dbws.set_target_endpoint_address(call_, 'http://salah-test.sismo.local:8080/SIMSEJB/SIMSFacadeBean');
sys.utl_dbws.set_property(call_, 'SOAPACTION_USE', 'TRUE');
sys.utl_dbws.set_property(call_, 'SOAPACTION_URI', 'sendMessage');
sys.utl_dbws.set_property(call_, 'OPERATION_STYLE', 'document');
x := genererSvar;
doc := xmldom.newDOMDocument;
main_node := xmldom.makeNode(doc);
root_elmt := xmldom.createelement(doc, 'q0:sendMessage');
xmldom.setattribute(root_elmt, 'xmlns:q0', 'si.sims.intern.service');
root_node := xmldom.appendChild(main_node, xmldom.makeNode(root_elmt));
-- Adding arg 0 as a string
arg0_elmt := xmldom.createelement(doc, 'arg0');
arg0_node := xmldom.appendchild(root_node, xmldom.makenode(arg0_elmt));
arg0_text := xmldom.createtextnode(doc, '2');
arg0_node := xmldom.appendchild(arg0_node, xmldom.makenode(arg0_text));
-- Adding arg 1 as a string
arg1_elmt := xmldom.createelement(doc, 'arg1');
arg1_node := xmldom.appendchild(root_node, xmldom.makenode(arg1_elmt));
arg1_text := xmldom.createtextnode(doc, x.getClobVal());
arg1_node := xmldom.appendchild(arg1_node, xmldom.makenode(arg1_text));
-- Adding arg 2 as a string
arg2_elmt := xmldom.createelement(doc, 'arg2');
arg2_node := xmldom.appendchild(root_node, xmldom.makenode(arg2_elmt));
arg2_text := xmldom.createtextnode(doc, 'false');
arg2_node := xmldom.appendchild(arg2_node, xmldom.makenode(arg2_text));
request := xmldom.getxmltype(doc);
pl('Request:');
pl(request.getStringVal());
response := sys.utl_dbws.invoke(call_, request);
pl('Showing respons');
pl(response.getStringVal());
doc := DBMS_XMLDOM.newDomDocument(response);
sys.utl_dbws.release_call(call_);
sys.utl_dbws.release_service(svc_);
end forwardToQueue;Is the Document well defined via schema? You might be able to use the autotype
ant task to generate a serializer.
Otherwise, serialize the document to a string, then wrap it in <[CDATA[...]]>
on the return. The calling app will need to understand that the string is xml,
and then desrailize it manually.
Mike
"Surya" <[email protected]> wrote:
>
I have web service which has to retuen an XML document (org.w3c.dom.Document)
as
a paramter. Since this is not a supported data type for in-out paramaters,
I will
have to serialize and write my own converter. What is the best solution?
Is there
any class/library that can convert the document into String which I can
return
as a parameter and again get create a XML document in the client side.
Thanks -Surya -
XML Parser Error while creating Web service Client using JAX RPC
hello evryone,
Im facing XML Parser Error while creating web service client using JAX RPC. Im using Net Beans IDE for development purpose. I have wrote configuration file for client. Now i want to create Client stub. However i dont know how to do this in Net Beans. So i tried to do it from Command promt using command :
wscompile -gen:client -d build -classpath build config-wsdl.xml
here im getting Error:
error parsing configuration file: XML parsing error: com.sun.xml.rpc.sp.ParseException:10: XML declaration may only begin entities
Please help me out.
Many thanks in advance,
KaceeCan i use the client generated using jdeveloper 11g to import into the oracle forms 10g, i.e., form builder 10g. Currently this is the version we have in our office.
-
Unable to access end point while invoking web service from bpel
We are trying to Consume Web Service in our SOA Application and we are getting the following error:-
"java.lang.Exception: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: oracle.fabric.common.FabricInvocationException: Unable to access the following endpoint(s): http://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyy.svc ".
Scenario*:-
1.The Web Service that we are trying to consume is built on Microsoft Dynamics AX Framework and is using Windows Authentication and we are using Oracle Soa Suite 11g(11.1.1.5) to access it.
2.The Web Serice is Hosted on IIS server 7.0 . The Soa server and IIS server both are on the same domain(Also need to confirm that is there any need to pass credentials while consuming Web Services when both the servers are on same domain??).
3.We have tested the Web Service in SOAP UI and is working fine only when we pass the Username,Password and Domain.And if we do not pass the User Credentials then we get the following error:-
" 401 - Unauthorized: Access is denied due to invalid credentials.
You do not have permission to view this directory or page using the credentials that you supplied."
4.We can even access the WSDL from the browser.
Plz help me out to resolve this issue.Will be really greatfull
Edited by: 937798 on May 31, 2012 2:36 AM910764
1:- I have not begged or requested for marking all answers as helpful. If answers are helpful then post author can do that.
2:- I also follow same practice. I dont blindly mark all answers correct or helpful. It can waste other's time. Correct marking is very important. Hence my all question are not having close end.Few are still open for correct answers. I will happily mark them correct if you can help me in that.
In the end , I will say Kindly refrain yourself using this platform as facebook or other social networking websites.
I hope you will understand seriousness of this forum and utilize its member's posts at the most.
Thanks,
Ashu -
Bypass login screen while accessing web viewable URL of secure content
As a Anonymous user, when i click any secure content web viewable URL, UCM is
prompting for credentails. Please help me How can we avoid login for anonymous
while accessing web URL's.
This is for UCM 10gr3 with Apache http server
Thanks in advanceIn a Java filter (AlterUserCredentials), we are giving UCM_LOCAL_ROLE (UCM role) to the anonymous user based on cookie value. LOCAL_ROLE has read access to LOCAL security group content. If a user is accessing URL with in corporate network, cookie value is Local else cookie value is external. This is working perfect for GET_SEARCH_RESULTS and DOC_INFO.
Whereas when we access LOCAL security group content web viewable URL’s as anonymous user, UCM is prompting for credentials (log in screen). Before reaching the filter code, UCM is prompting for credentials.
Please let us know, how to bypass this login screen for secure content web url access as a anonymous user. -
Not able to access web service with axis and tomcat
Dear all
i am trying to access web service using axis in tomcat.
i downloaded axis-bin-1_4.zip, unzipped it and installed it properly in tomcat.
i had tested axis, its working fine.
i had created a simple java class(a sample class from book) and deployed it in axis. i also created a client(a java consol class) for accessing that web service. but its giving error. i have no idea why this is comming.
plz point me in right direction.
thanks in advance
The error is:
Exception in thread "main" AxisFault
faultCode: {http://xml.apache.org/axis/}HTTP
faultSubcode:
faultString: (404)/axis/ArithmeticProcessor.jws
faultActor:
faultNode:
faultDetail:
{}:return code: 404
<html><head><title>Apache Tomcat/6.0.14 - Error report</tit
le><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;ba
ckground-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;
color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Ari
al,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-f
amily:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-famil
y:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:
Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color :
black;}A.name {color : black;}HR {color : #525D76;}--></style> </hea
d><body><h1>HTTP Status 404 - /axis/ArithmeticProcessor.jws</h
1><HR size="1" noshade="noshade"><p><b>
type</b> Status report</p><p><b>message</b> <u&
gt;/axis/ArithmeticProcessor.jws</u></p><p><b>descriptio
n</b> <u>The requested resource (/axis/ArithmeticProcessor.jws) is n
ot available.</u></p><HR size="1" noshade="noshade
"><h3>Apache Tomcat/6.0.14</h3></body></html>
{http://xml.apache.org/axis/}HttpErrorCode:404
(404)/axis/ArithmeticProcessor.jws
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.j
ava:744)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrateg
y.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at ArithmeticClient.main(ArithmeticClient.java:50)Hi ,
Please go through this link and check in this way only you created the webservice correctly or not. If not follow and do it definitely will get you the webservice access by iphone or any application.
www.scribd.com/doc/19255987/Web-Services-in-Abap -
Hi,
I am trying to update the Query of an existing WEBI document's dataprovider, through the RESTful Web service SDK.
For this, first i will get the Dataprovider information,
Example:
URI: http://localhost:6405/biprws/raylight/v1/documents/11111/dataproviders/DP0
Expected result;
<dataprovider>
<id>DP0</id>
<name>Query 1</name>
<dataSourceId>1234</dataSourceId>
<updated>2014-04-18T11:55:21.000-08:00</updated>
<duration>1</duration>
<isPartial>false</isPartial>
<rowCount>113</rowCount>
<flowCount>11</flowCount>
<dictionary>
<expression qualification="Dimension" dataType="String">
<id>DP0.DO1</id>
<name>EmpID</name>
<description>Employee ID.</description>
<dataSourceObjectId>DS0.DO1</dataSourceObjectId>
</expression>
<expression qualification="Dimension" dataType="String">
<id>DP0.DO2</id>
<name>EmpName</name>
<description>Employee Name.</description>
<dataSourceObjectId>DS0.DO2</dataSourceObjectId>
</expression>
</dictionary>
<query>SELECT Employee.EmpID, Employee.EmpName FROM Employee</query>
</dataprovider>
Then Changing the above dataprovider's Query to some thing like below,
<query>SELECT Employee.EmpID, Employee.EmpName FROM Employee where Upper(Employee.EmpName)='RAJ'</query>
Please let me know the RESTful Call required to do this.
Thanks in advance.
Thanks,
Mahendra.FYI, the output of this call returns something like:
<?xml version="1.0" encoding="UTF-8"?>
<queryplan>
<union>
<fullOuterJoin>
<statement index="1">SELECT 'FY' || to_char(SALES.invoice_date,'yy'), count( distinct SALES.inv_id) FROM SALES GROUP BY 'FY' || to_char(SALES.invoice_date,'yy')</statement>
<statement index="2">SELECT 'FY' || to_char(SALES.invoice_date,'yy'), sum(INVOICE_LINE.nb_guests) FROM SALES, INVOICE_LINE, SERVICE_LINE, SERVICE WHERE ( SALES.INV_ID=INVOICE_LINE.INV_ID ) AND ( INVOICE_LINE.SERVICE_ID=SERVICE.SERVICE_ID ) AND ( SERVICE.SL_ID=SERVICE_LINE.SL_ID ) AND ( SERVICE_LINE.service_line = 'Accommodation' ) GROUP BY 'FY' || to_char(SALES.invoice_date,'yy')</statement>
</fullOuterJoin>
<fullOuterJoin>
<statement index="3">SELECT 'FY' || to_char(SALES.invoice_date,'yy'), count( distinct SALES.inv_id) FROM SALES GROUP BY 'FY' || to_char(SALES.invoice_date,'yy')</statement>
<statement index="4">SELECT 'FY' || to_char(SALES.invoice_date,'yy'), sum(INVOICE_LINE.days * INVOICE_LINE.nb_guests * SERVICE.price) FROM SALES, INVOICE_LINE, SERVICE WHERE ( SALES.INV_ID=INVOICE_LINE.INV_ID ) AND ( INVOICE_LINE.SERVICE_ID=SERVICE.SERVICE_ID ) GROUP BY 'FY' || to_char(SALES.invoice_date,'yy')</statement>
</fullOuterJoin>
</union>
</queryplan> -
Not able to access Web services
Hi all,
I am trying to access web services using the transaction WSADMIN.
But when i give the authorization while generating the WSDL, the following error pops up:
<b>Technical Details of Soap Core Exception
Message Text: SRT: ASSERT failed: object reference not bound
Class: CL_SOAP_REGISTRY
Method: generate_wsdl
LocationID: 6
Program: CL_SOAP_REGISTRY==============CP
Include: CL_SOAP_REGISTRY==============CM00J
Line: 59</b>
Can anyboby share his/her insights in this regard?
Thanks,
AnkitHi Fernando,
Thanks for this.
I was able to activate and deactivate the services. But i was not able to test these services (HTTP 500 Internal server error).
Also the services which are listed in the trnx SICF are not present in the trnx WSADMIN (I am using trnx WSADMIN to go to the home page of the web service and download the WSDL file of the service). What may be the reason?
Is there some configuration setting which I am missing or is it some other problem?
Regards,
Ankit -
Interactive Statement unable to access Web Service
I have a working Flash Builder project from which I generate a nav file which I use to generate an Interactive Statement using a process in Workbench.
The Interactive Statement works fine with all the Flash content and data merged from xml.
When I incorporate using a Web Service in the Flash Builder project code to populate a data grid, and regenerate the nav file to generate the interactive statement, the interactive statement gives the following security error when opened:
Security error accessing url
Destination: DefaultHTTP
It seemed that this issue is related to cross domain policy or something like that, BUT I do not get this error when:
1. I run the Flash Builder project directly from Flash Builder that fires up IE and my flash content works perfectly fine in the HTML wrapper, including the web service call that works fine. This works fine both from the bin-debug and the bin-release folders of my Flash Builder project.
2. I created an AIR application from scratch, and consumed the same webservice as used in the earlier Flash Builder project being used to generate nav file for Interactive Statement. The AIR application also works perfectly fine in invoking the web service and does not give any errors.
Question: Why is my Interactive Statement unable to access the web service and gives the error as mentioned above when the same web service is being accessed and consumed successfully by the same flash content in an html wrapper and in an AIR application. How to make my flash content embedded in the PDF container to access and consume the web service?Hi Muhammad,
Acrobat has different crossdomain restrictions. Try a crossdomain file that looks like to test the connection:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" to-ports="*" />
<allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>
Following there are a couple of good articles dealing with web services calls:
http://forums.adobe.com/message/3784114#3784114
http://tv.adobe.com/watch/flex-in-a-week-day-2/retrieving-and-handling-data-using-webservi ce/
http://blogs.4point.com/brad.white/2008/12/4-ways-to-invoke-a-webservice-in-flex-with-mxml -and-actionscript.html
http://blog.flexexamples.com/2008/04/14/calling-a-simple-web-service-from-flex-using-the-w ebservice-class/
Regards,
Oana -
Error at run time When Access Web Service in web dynpro java
Hi
I am used web service created on other machine.I am used wsdl file created in web service.
is there any setting on J2EE Engine server for accessing web service? after run web dynpro application it gives following error.
The initial exception that caused the request to fail, was:
java.io.IOException: Unable to open connection to host "128.9.125.6:8000". Connection timed out:could be due to invalid address.
at com.tssap.dtr.client.lib.protocol.Connection.openSocket(Connection.java:2117)
at com.tssap.dtr.client.lib.protocol.Connection.open(Connection.java:1380)
at com.tssap.dtr.client.lib.protocol.Connection.sendInternal(Connection.java:1534)
at com.tssap.dtr.client.lib.protocol.Connection.send(Connection.java:1427)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
... 50 more
please help me.
thank in advanceHi,
java.io.IOException: Unable to open connection to host "128.9.125.6:8000". Connection timed out: could be due to invalid address. first check it are you able to connect the WSNavigator. I think you are not able to connect the WSNavigator and are you able to see the WebService in WSNavigator?
Procedure
To import a Web service model, proceed as follows:
1. Choose the context menu entry -
Create Model on the -
Models node of the relevant component.
2. In the model wizard, choose Import Web Service Model followed by Next.
3. In the second wizard window, enter a model name and specify the package and source code directory. The name of the proxy package is created automatically when you specify the model package.
4. Select whether your Web service source is from a local server, is addressed using a URL, or whether it is a UDDI service.
5. If you select Local File System or URL, choosing Next will take you to the following window in which you enter a local WSDL URL or select one by choosing Browse.
6. If you selected the option UDDI or URL, choosing Next will take you to the following wizard window in which you either enter a WSDL URL of a UDDI service directly or select one by choosing UDDIu2026
Enter the WSDL description of the Web service in the Wsdl field u2013 for example, http://webservices.matlus.com/scripts/emailwebservice.dll/wsdl/IemailService for an e-mail service.
You do not need to make any entries in the next step, Proxy Definition / URI Package Mappings. Choose Finish to close the window.
7. Switch to the Package Explorer view, select the file lport1.lp in the directory \src\packages\<myPackage>\, and check the port entries.
Hope this helps!!
Regards
Vijay
Maybe you are looking for
-
JRE 1.3.0 to JRE 1.4.2 Mouse related changes
My application developed in JRE 1.3.0 shows quirky behaviour when using JRE 1.4.2 to run. The mouse focus goes to a text box unnecessarily. Was there any event handling change with respect to mouse done between JRE 1.3.0 to JRE 1.4.2? has anyone face
-
Web Forgery popup on every auction i go to on ebay
I went to surf on ebay today and every auction I went to had this message: This web page at vi.ebaydesc.com has been reported as a web forgery and has been blocked based on your security preferences. I was surfing ebay yesterday and everything was fi
-
Regarding Unregister with shared services in 11.1.1.2
Hi There We have an option in 9.3.1 that we can unregister the registered application. But trying to Unregister in Fussion 11.1.1.2. Is there any way that i can unregister,please let me know so that could be a great help. Thanks Hv
-
HT4623 my phone got an error message while trying to update
my phone got an error message while trying to update
-
Instalation Problem Oracle 10g In Fedora Core 4
Hello I have this installer oracle-xe-univ-10.2.0.1-1.0.i386.rpm already installed in Fedora Core 5 without any problem when i didt it for Fedora Core 4 (other machine i have this error) (same instalation configuration!!!) [root@localhost Section1]#