Web Services and XML Object
Hi All ,
The types supported by JAX-RPC seem not to include any XML object (i.e. org.JDom.Document). But OC4J supports this. Any one can give me direction if any other tools can permit me in creating web services which will permit to exchange XML objects (Documents or Elements ) .
Regards,
Rao
Apache Axis has support for RPC, Document, Wrapped and Message service styles.
see http://ws.apache.org/axis/java/user-guide.html#PublishingServices and scroll down to the 'Message services' subheading.
JAX-RPC supports the RPC service style.
Pete
Similar Messages
-
Recently added to DCI's Corporate and e-Business Portals
Conference:
Databases, Portals, Web Services, and XML Integration Magic
When: July 29, 2001, 9:00 AM - 5:00 PM
Where: Hynes Convention Center, Boston
http://www.dci.com/brochure/porbos/seminars.aspRecently added to DCI's Corporate and e-Business Portals
Conference:
Databases, Portals, Web Services, and XML Integration Magic
When: July 29, 2001, 9:00 AM - 5:00 PM
Where: Hynes Convention Center, Boston
http://www.dci.com/brochure/porbos/seminars.asp -
Process Web Services and BPM Objects
Hi,
I try to expose a web service for a specific process (not PAPI-WS) for process creation. Works well but only if I use only simple types like String, etc. as input arguments. But when I try to use an BPM object, I get an error like 'Undefined variable 'arg1''.
So, is it not possible to use such a process web service using BPM objects as arguments?
Regards
MatthiasYes it's true but Netbeans uses one of the existing SOAP implementations to do it. I'm almost sure that it uses one of the most popular implementations JAX-WS RI or Axis by default.
Regards,
Sławomir Wojtasiak -
Web service and servlets in the same project...web.xml?
Hello, I have a problem with my web service.
I have a server, which displays a web service. I programmed this service with JAXRPC.
I have a client, in another directory. I succeded in compiling, deploying and running the web service.
The problem is that after I tried to integrate this service in an existing project. This project contains servlets. In these servlets, I'm using sessions.
These servlets are on the same side as the server of the web service. Because of the implementation of my code, I'd like to use in the class that represents the server of the service, the same session as the one I'm using in the servlets.
But of course, it's not working by itself. I know there's something to do with the web.xml files.
The thing is that I created a web.xml file for the service, and another for the servlets.
I was thinking of joining both of them in one xml file, but everything crashes then...
Could someone tell me how to create a project with a web service and servlets, and mostly how to configure the xml file??
Thanks for any help
PhilippeHello, I have a problem with my web service.
I have a server, which displays a web service. I programmed this service with JAXRPC.
I have a client, in another directory. I succeded in compiling, deploying and running the web service.
The problem is that after I tried to integrate this service in an existing project. This project contains servlets. In these servlets, I'm using sessions.
These servlets are on the same side as the server of the web service. Because of the implementation of my code, I'd like to use in the class that represents the server of the service, the same session as the one I'm using in the servlets.
But of course, it's not working by itself. I know there's something to do with the web.xml files.
The thing is that I created a web.xml file for the service, and another for the servlets.
I was thinking of joining both of them in one xml file, but everything crashes then...
Could someone tell me how to create a project with a web service and servlets, and mostly how to configure the xml file??
Thanks for any help
Philippe -
How to connect to external web service and convert XML to a table
Hi experts,
I need to connect to external/non-SAP web service and convert XML in that site to a SAP table?
Is there a function call(SE37) to do this? Is it a must for me to install AS JAVA or PI and configure enterprise service? Please provide a link for me to retrieve relevant infomation, thx.No, you don't need PI or the Java stack for this. You can create an ABAP proxy using the WSDL file for the web service and call the web service using the proxy class in an ABAP program. You can transform the XML response to internal tables/structures/variables using a transformation template that you create.
-
Binding xml from web service to java objects
I would appreciate if someone can tell me where can i get information regarding
binding of xml from web service to java objects in weblogic 6.1 .
Thanks,
agHi Ag,
To my knowledge, the only information on this topic is whatever you find in the
documentation. What exactly do you want to know?
Can you post a set of specific questions?
Regards,
Mike Wooten
"ag" <[email protected]> wrote:
>
I would appreciate if someone can tell me where can i get information
regarding
binding of xml from web service to java objects in weblogic 6.1 .
Thanks,
ag -
Bad XML from external web service and would like to change the content
I am getting a bad XML(not valid) from external web service and I would like to change the content of the body in OSB proxy service to make it valid.
For example
<g:Information xsi:schemaLocation="http:// bad schema" xmlns:g="http://abc.com/t.xsd">
<test>Test Data</test>
</g:Information>
should become
<g:Information xmlns:g="http://abc.com/t.xsd">
<test>Test Data</test>
</g:Information>
Do you how can I do this?I don't think it would be the best solution but you may try -
1. Conver the incoming XML to string using fn-bea:serialize() function
2. Replace the not-required content with a blank
3. Covert the string back to XML using fn-bea:inlinedXML
If you find any other solution, please let us know.
Regards,
Anuj -
Pl/Sql web service and collections not working
Hello
I'm trying to create a web service from a function in a package which returns a collection. The creation of the web service and its deployment seem to work correctly. I do get the following warning :
WARNING: OWS-00077 The Value Type class: pxWsLang.PamLanguagerecordBase does not have a valid JAVA Bean pattern
but I don't think this is the source of the problem.
When I try to test the web service using the endpoint in the wsdl I get the following answer in the browser:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><env:Fault xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>env:Server</faultcode><faultstring>Error creating target: pxWsLang.WsLangUser</faultstring><faultactor></faultactor></env:Fault></env:Body></env:Envelope>
In the DOS window for the OC4J I get the following error :
2006-11-15 09:21:25.852 ERROR OWS-04005 An error occurred for port: {http://pxWs
Lang/WsLang.wsdl}wsLangSoapHttpPort: javax.xml.rpc.JAXRPCException: Error creati
ng target: pxWsLang.WsLangUser.
The PL/SQL code is as follows :
Object:
CREATE OR REPLACE TYPE PAM_LanguageRecord as OBJECT
NR NUMBER(3),
SYMBOL VARCHAR2(2)
Collection:
CREATE OR REPLACE Type PAM_LanguageTable as Table of PAM_LanguageRecord;
Package body :
create or replace package body PAM_TEST is
function CursorTest return Pam_LanguageTable is
Res_LangTable PAM_LanguageTable;
cursor cur is select * from stc_languages;
begin
Res_LangTable := new PAM_LanguageTable();
for Rec in cur loop
Res_LangTable.Extend(1);
Res_LangTable(cur%ROWCOUNT) := new PAM_LanguageRecord
(Rec.NR,
Rec.SYMBOL
end loop;
Return Res_LangTable;
end;
end;
I'm using JDeveloper version 10.1.3.1.0.3984
How can I get this to work ? (without using Apache Axis or other tools :-)
Is it supposed to work ?
Many Thanks
PaulHi,
for the "error creating target" problem I found the solution here:
[WS from a PL/SQL package]: Error creating target
Hope this helps.
Regards,
Patrik -
Web service problem serializing objects?
JDeveloper Studio Edition Version 10.1.3.2.0.4066
I deployed a web service developed with JDeveloper to OAS 10.1.3.1.0
I generated a web service client proxy in JDeveloper to call the web service.
I get an exception (below). I tried regenerating the proxy code. Same exception when I try running it. I tried regenerating the web service and redeploying. Same exception.
It seems like the WSDL is correct, but the XML produced by the web service drops some letters from the schema types?
Has anyone else seen this? Here is the exception I'm getting:
unexpected element type: expected={http://edu.apollogrp.selfservice/ISelfService.xsd}edu_apollogrp_selfservice_SelfServiceResults, actual={http://edu.apollogrp.selfservice/ISelfService.xsd}edu_apollog_SelfServiceResults
at oracle.j2ee.ws.common.encoding.SerializerBase.verifyType(SerializerBase.java:168)
at oracle.j2ee.ws.common.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:170)
at oracle.j2ee.ws.common.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:147)
at customerservice.proxy.runtime.SelfServiceBinding_Main_RespS__SOAPSerializer.doDeserialize(SelfServiceBinding_Main_RespS__SOAPSerializer.java:44)
at oracle.j2ee.ws.common.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:180)
at customerservice.proxy.runtime.SelfServiceBinding_Stub._deserialize_Main(SelfServiceBinding_Stub.java:193)
at customerservice.proxy.runtime.SelfServiceBinding_Stub._readFirstBodyElement(SelfServiceBinding_Stub.java:176)
at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:333)
at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:112)
at customerservice.proxy.runtime.SelfServiceBinding_Stub.main(SelfServiceBinding_Stub.java:81)
at customerservice.proxy.SelfServicePortClient.mainExt(SelfServicePortClient.java:44)
at customerservice.SelfService.getSSData(SelfService.java:116)
at customerservice.SelfService.Test(SelfService.java:93)
at customerservice.SelfService.main(SelfService.java:109)Yeah. You need a deserialize class to deserialize (cast) the Complex Data Type (object). But the orignal class is not necessary. Also, it is impossible to use the orignal class if you write a client on J2EE platform to consume a service on .NET platform. Your can use the WSDL file to generate a tub using some tool. The stub can handle the remote calls and de/serialization (cast).
Hope this can help you. Cheers
Shaun -
BPEL web service and siebel integration
We are trying to deploy a web service in bpel - the web service takes xml as an input and calls a pl//sql api in a database to execute a piece of code.
We deployed the wsdl file - in siebel (creats a new business service and 2 integration objects) - and are trying to call the web service (business service) by passing an xml file from siebel (using EAI Siebel Adapter business service).
We are able to call the web service but - unable to pass the input xml -
Any help would be apprieciated.
Regards,
SiddharthHi Siddarth,
We are doing similar kind of POC where Siebel team will expose a WSDL at some URL and it need to be called in an ESB or BPEL. We are facing a problem in validating the provided WSDL and not able to generate XSD out of it. Can you tell me how u r able to call the webservice in an ESB(in detail) ??? Siebel and oracle fusion are at different locations.
Quick response would be appriciated. -
Diff b/w Web service and window service
What is the difference between web service and window service, whether the both are same or not, Give some explain about that each one and give some examples also.
An XML Web service is a component that implements program
logic and provides functionality for diseparate
applications. These applications use standard protocols,
such as HTTP, XML, and SOAP, to access the functionality.
XML Web services use XML-based messaging to send and
receive data, which enables heterogeneous applications to
interoperate with each other. You can use XML Web services
to integrate applications that are written in different
programming languages and deployed on different platforms.
In addition, you can deploy XML Web services within an
intranet as well as on the Internet. While the Internet
brings users closer to organizations, XML Web services
allow organizations to integrate their applications.
A Windows service starts much before any user logs in to
the system (if it has been setup to start at boot up
process). A Windows service can also be setup in such a way
that it requires a user to start it manually ? the ultimate
customization!
Windows services run as background processes. These
applications do not have a user interface, which makes them
ideal for tasks that do not require any user interaction.
You can install a Windows service on any server or computer
that is running Windows 2000, Windows XP, or Windows NT.
You can also specify a Windows service to run in the
security context of a specific user account that is
different from the logged on user account or the default
computer account. For example, you can create a Windows
service to monitor performance counter data and react to
threshold values in a database. -
Exposing Web Services as Callable Objects
Hello!
I have SAP NetWeaver 04s SP7. How can I expose Web Services as Callable Objects?
According to "Exposing Web Services as Callable Objects" (http://help.sap.com/saphelp_nw2004s/helpdata/en/44/4758351fcb1193e10000000a155369/frameset.htm), I should start with choosing type of CO "Service -> Web Service".
Actually, I haven't this entry in CO type list!
According to integrate Web Services with GP, this type appeared in SP8. What are the alternatives in SP7?
"Background execution" and "External service" seem to be the best candidates...
What is the best solution?
Thanx in advance!Hello, Jan!
I have SAP NWDS 7.0.07, and I cannot find there an option to create a CAF project. I can create Web service, EJB, Web DynPro, and something else - but not a CAF project. In documentation I did not find the connection points between NWDS and External Services, except some plug-ins.
Maybe I've misunderstood you, sorry - I'm a newbie in SAP
Actually, I've made a simple EJB, created a Web service from it, and deployed the WS to portal. Maybe, EJB instead of Web service can be somehow used in CAF?
I've tried to create a CO of type Composite Application Service, but there was necessary to configure endpoint aliases. I've read the manual "Configuring Endpoint Aliases", but didn't succeed to make one for EJB remote call... I've defined the name, URL (http://<host_of_portal>:<portal_port>), user and pwd - but I've got an exception when tried to use the created alias:
com.sap.caf.core.gp.servicelocator.exception.MetaModelBrowserException: Exception while trying to get InitialContext. at com.sap.caf.core.gp.servicelocator.CAFMetaModelBrowser.getAllApplications(CAFMetaModelBrowser.java:77) at com.sap.caf.core.gp.ui.backgroundco.admin.VSelect.browseCAFCore(VSelect.java:305) at com.sap.caf.core.gp.ui.backgroundco.admin.VSelect.onActionSelectEptAlias(VSelect.java:750) at com.sap.caf.core.gp.ui.backgroundco.admin.wdp.InternalVSelect.wdInvokeEventHandler(InternalVSelect.java:287) at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87) at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67) at
Maybe, the easiest way is to upgrade the versions of SAP and NWDS?
Are there some manuals that could provide me some help about:
1) creating CAS from the deployed Web service (from its creation in NWDS till its use in CAF, step-by-step)
2) binding Web Dynpro apps and Web services, using CAF and GP.
Or maybe I should attend SAP courses?
I have SAP NetWeaver 04s SP7 and NWDS ver. 7.0.07.
Sorry for the messy post, I did my best
Message was edited by:
Kirill Shepitko -
i have developed a very small web service and which is hosted along with our web site. our webservice url is
http://www.bba-reman.com/Search/SearchDataIndex.asmx
web service code
namespace WebSearchIndex
#region SearchDataIndex
/// <summary>
/// SearchDataIndex is web service which will call function exist in another library for part data indexing
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public class SearchDataIndex : System.Web.Services.WebService
//public AuthHeader ServiceAuth=null;
public class AuthHeader : SoapHeader
public string Username;
public string Password;
#region StartIndex
/// <summary>
/// this function will invoke CreateIndex function of SiteSearch module to reindex the data
/// </summary>
[WebMethod]
public string StartIndex(AuthHeader auth)
string strRetVal = "";
if (auth.Username == "Admin" && auth.Password == "Admin")
strRetVal = SiteSearch.CreateIndex(false);
else
SoapException se = new SoapException("Failed : Invalid credentials",
SoapException.ClientFaultCode,Context.Request.Url.AbsoluteUri,new Exception("Invalid credentials"));
throw se;
return strRetVal;
#endregion
#endregion
when i was calling that web service from my win apps using
HttpWebRequest
class then getting error The remote server returned an error: (500) Internal Server Error
here is code of my win apps from where i am calling web service
string strXml = "";
strXml = "<s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'><s:Body><StartIndex xmlns='http://tempuri.org/' xmlns:i='http://www.w3.org/2001/XMLSchema-instance'><auth><Username>joy</Username><Password>joy</Password></auth></StartIndex></s:Body></s:Envelope>";
string url = "http://www.bba-reman.com/Search/SearchDataIndex.asmx";
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
req.Method = "POST";
req.ContentType = "text/xml";
req.KeepAlive = false;
req.ContentLength = strXml.Length;
StreamWriter streamOut = new StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII);
streamOut.Write(strXml);
streamOut.Close();
StreamReader streamIn = new StreamReader(req.GetResponse().GetResponseStream());
string strResponse = streamIn.ReadToEnd();
streamIn.Close();
i am just not being able to understand when this line execute
StreamReader streamIn = new StreamReader(req.GetResponse().GetResponseStream());
then getting the error The remote server returned an error: (500) Internal Server Error
not being able to understand where i made the mistake. mistake is in the code of web service end or in calling code?
help me to fix this issue. thanksHi Mou,
I just tried your win app code about calling web service, but failed. I got the 500 error after I called your service:
The error message I quoted from Fiddler:
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>System.Web.Services.Protocols.SoapException: Failed : Invalid credentials ---> System.Exception: Invalid credentials
--- End of inner exception stack trace ---
at BBAReman.WebSearchIndex.SearchDataIndex.StartIndex(AuthHeader auth)</faultstring><faultactor>http://www.bba-reman.com/Search/SearchDataIndex.asmx</faultactor><detail /></soap:Fault></soap:Body></soap:Envelope>
I am not totally sure that error occurred by the authentication. But I suggest you can try to add this service into your project using this method below:
1.right click the Reference and select Add Service Reference
2.input your service link and click "Go"
And you can use this service as the following:
private async void callService()
ServiceReference1.SearchDataIndexSoapClient client =new ServiceReference1.SearchDataIndexSoapClient();
var Str= await client.StartIndexAsync(new ServiceReference1.AuthHeader { Username = "Admin", Password = "Admin" });
Please try it.
Regards,
Will
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Hello,
I have a Visual Studio 2010 C# class with a method that invokes/consumes a web service and returns an XML dataset. I am traversing through the parent/child nodes and parsing out the data then inserting it into a SQL Server 2008 R2 table for a join within
another stored procedure.
Instead of using a 3rd party API to generate the PDF for this data, I am creating an SSRS report. The formatting will be easier and I can do a RenderFormat directly to PDF.
Can I expect to be able to transfer the code-behind method to this report and have it be able to work with the web service the same way? It is a SOAP-based web service returning parent nodes and two levels of nested child nodes.
I have also been researching the approach of calling the web service in the same stored procedure that is currently querying the physical tables (which is used to populate a gridview and PDF) but it looks like it may only be possible with a CLR stored procedure.
Is it possible to implement a CLR stored procedure within an SSRS report?
Hope this makes sense. Any help, suggestion or point in the right direction would be greatly appreciated.
Thanks,
BusterHi Buster,
SSRS supports web service data source, we can call the SOAP-based web service in SSRS report directly. Then, we can use custom code in SSRS to parse the XML data. However, we won’t be able to join another data in SQL Server database.
Reference:http://technet.microsoft.com/en-us/library/aa964129(v=sql.90).aspx#repservxmlds_topic3
We cannot implement a CLR stored procedure within an SSRS report directly. In order to execute the CLR store procedure in a SSRS report, we have to execute it as text using the following code:
Exec <stored procedure name>
Reference:
http://dotnetslackers.com/Community/blogs/bmains/archive/2009/01/15/executing-a-clr-stored-procedure-in-reporting-services.aspx
Hope this helps.
Regards,
Alisa Tang
Alisa Tang
TechNet Community Support -
Web Service to xml to bls to xacute query formatting
Hi.
I have a BLS calling a web service which returns a data set in the xMII XML format. I take that output and put it in a xml transaction output property and try to read it with an xacute query. (obviously I will be doing more manipulations to the data in the bls once i get this issue resolved). The query returns a blank page when tested.
OK, so I take the same xml output, and in the same bls use the Write_File action to create an xml file, then use the XMLLoader action to read in that file back into the bls, assign the results of the xmlLoader to the xml transaction output property and try to read that output with an xacute query. I get the data when I test the query.
Now, I don't touch the format between the web service and the file or after I load the file. How come the xacute query can read one transaction output and not the other?
I have taken both transaction propertie values from a trace log and compared the strings and find no difference between the return from the web service and the result of the xmlLoader. I don't want to take the output of the web service and write it to a file just to get in into an xml format that works properly.I am sure that is the root cause, but how do I do an explicit type conversion without going through the output to file and load xml step? What else is needed?
The return of the Web Service is an XML that contains an XML string in the xMII format. I can look at that string and it looks correct (Though xacute doesn't recognize the string as an xml structure). I can take that string and put it in an XML transaction property and it looks correct (the reference in the BLS is: SqlXml2.SQLXML2Response{/ns1:SQLXML2Response/ns1:SQLXML2Return}). I can take that XML variable and output to a file and then load that file and it actually is correct (though the content of the file and the return string from the web service are identical). So, I can see that the type conversion takes place when I load the xml file but I haven't found the action that will do the type conversion otherwise even though the "conversion" doesn't seem to require changing the content at all. Have I missed something?
Maybe you are looking for
-
"Reopen all windows from last session" unavailable
Safari was loading web pages very slowly, so I closed 2 windows, each with multiple tabs, and then quit Safari. I reopened Safari, went to History, but the "Reopen all windows from last session" option was greyed out. How can I restore my tabs? Thank
-
How do i get my imei back on my phone
My phone lost it's imei some how now it doesn't want to work anymore any one know how to fix it. Tried i tunes just keeps saying that the system is un available
-
I am working on writing applets. When user dowloads the page with my applet the jar-file with my classes is being loaded too. Is it possible to use the text file which stored in jar-file from my classes? How can I do that if it is possible?
-
My ZAGG keyboard will not auto-cap, How do I fix that
My ZAGG keyboard will not auto-cap, How do I fix that?
-
I want create Idoc CONF21 for Production Order ConfirmationIdoc (In bound)
Dear All, My Requirement is to confirm the Production Orders though Idoc in executable program.