Build web service with value types
Hi,
I am trying to build a web service that uses a value type as a parameter.
I am using wscompile and wsdeploy to build the service.
But I don't know how to include the value type in my service.
This is what I do:
First I compile all the java files and put them in my build directory (incuding the value type class)
Then I use wscompile -define -d build -nd build -classpath build config-interface.xml -model build/model.gz
Then I create the war file that contains the class files, model.gz, web.xml and jaxrpc-ri.xml.
Then I run wsdeploy -o dist/generic-serv.war dist/generic-service.war
How do I get my value type class included in the wsdl file? and does it need to be in the model.gz file aswell?
Sorry I was a bit wrong describing my problem.
I am trying to use an ArrayList containing value types as a parameter.
Similar Messages
-
Building web service with JAX-WS
Hi,
I would be to build a web service with JAX-WS and I must use the java classes of service in order to create
web services. What possibilties exist to make this with maven2 under eclipse IDE?
One help welcoming.
Thanks!I have this document, you try to read it.
http://www.cs.cmu.edu/~eran/lectures/TA_axis_and_deploy-Eran_Toch.ppt -
Pl Help......Web services with complex types
Hi,
I have deployed a web service on OC4J (9.02) having a complex type input and a complex type return. The web service is implemented as a stateless session bean and
the relevant web.xml for the deployment is:
<servlet>
<servlet-name>ZipLookupManager</servlet-name>
<servlet-class>oracle.j2ee.ws.SessionBeanWebService</servlet-class>
<init-param>
<param-name>jndi-name</param-name>
<param-value>ZipLookupManagerBean</param-value>
</init-param>
<init-param>
<param-name>class-name</param-name>
<param-value>com.indus.banner.components.cdyne.ZipLookupManagerBean</param-va
lue>
</init-param>
<init-param>
<param-name>interface-name</param-name>
<param-value>com.indus.banner.components.cdyne.IZipLookupManager</param-value
>
</init-param>
<init-param>
<param-name>custom-bean-qname</param-name>
<param-value>
com.indus.banner.components.cdyne.LatLongReturn,
http://cdyne.components.banner.indus.com,
LatLongReturn,
org.apache.soap.encoding.soapenc.BeanSerializer,
org.apache.soap.encoding.soapenc.BeanSerializer
</param-value>
</init-param>
<init-param>
<param-name>custom-bean-qname</param-name>
<param-value>
com.indus.banner.components.cdyne.ZipState,
http://cdyne.components.banner.indus.com,
ZipState,
org.apache.soap.encoding.soapenc.BeanSerializer,
org.apache.soap.encoding.soapenc.BeanSerializer
</param-value>
</init-param>
</servlet>
The web service deploys correct. I have all the relevant jars in the %J2EE_HOME%\lib folder. However, when I call the web service from a standalone client I get the following error:
java.lang.ClassNotFoundException:
org.apache.soap.encoding.soapenc.BeanSerializer
at
oracle.j2ee.ws.GeneratedClassLoader.findClass(GeneratedClassLoader.ja
va:48)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
at oracle.j2ee.ws.BaseWebService.initQnameMap(BaseWebService.java:602)
at oracle.j2ee.ws.RpcWebService.init(RpcWebService.java:453)
at
oracle.j2ee.ws.SessionBeanRpcWebService.init(SessionBeanRpcWebService
.java:54)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.
java:1956)
at
com.evermind.server.http.HttpApplication.findServlet(HttpApplication.
java:4355)
at
com.evermind.server.http.HttpApplication.getRequestDispatcher(HttpApp
lication.java:2484)
Please advise!
RizwanHi all,
I haven't heard back from anyone. Is this forum alive still? I have entered a TAR on metalink on this issue but they say that apparently this was a defect under 9.02 and has been fixed under 9.04.
Please help.
Many thanks in advance.
Rizwan -
Accessing a web service with complex types
Hi I have been struggling with this web service for a while
now....
I am trying to send input parameters that are composed by :
applicant name( name, surname, .....) and applicant input address(
hse no, street, postcode...) Applicant dob(dob)....I am using
<cfscript> tag to pass these parameters...Now my problem is
do i need to put each complex type inside its own <cfscript>
tag???
ie:
stName = structNew();
stName.Title = "#Mr#";
stName.forename = "Man";
stName.othernames = " NA";
stName.Applicant = "Yellow";
stName.suffix="";
stName.dob = createDate(1972,06,05);
and do this for applicant address? or could i enclose this in
under the same cfscript tag??
Any help would be appreciated...thanks
criticalCheck out
http://hcc.musc.edu/research/shared_resources/xml_complex_types_to_cf_structure_notes.cfm
The last part of that link is .cfm - not sure why its getting
cut off. -
Compile build.xml with Ant for web service with annotations
Hi Friends,
I have a web service with annotations, using javax.annotation.PostConstruct, and javax.annotation.PreDestroy.
I have a build.xml to create a EAR for this web service.
When I run the ant task, the build complete successfully but the .war file cannot be deployed on the WLS server. Taking a closer look, I see that the required files such as, webservices.xml, weblogic.xml, weblogic-webservices.xml, Provision.wsdl files are not generated.
Following is the build.xml file:
<?xml version="1.0" encoding="windows-1252" ?>
<project default="jwsc">
<property file="build.properties"/>
<property name="weblogic.jar.classpath"
value="C:/bea_jDev/wlserver_10.3/server/lib"/>
<property name="oimclient.jar.classpath"
value="C:/_data/Project_Dc/OIM_jars" />
<property name="com.jar.classpath" value="C:/JDeveloper/mywork/Service_Test/lib" />
<taskdef name="jwsc" classname="weblogic.wsee.tools.anttasks.JwscTask">
<classpath>
<path id="weblogic.classpath">
<pathelement path="WEBLOGIC_HOME"/>
<fileset dir="${weblogic.jar.classpath}">
<include name="**/*.jar"/>
</fileset>
</path>
</classpath>
</taskdef>
<target name="all" depends="clean,build-service,deploy"></target>
<target name="build-service">
<jwsc srcdir="${src.home}" destdir="ear_directory" >
<classpath>
<path id="oim.classpath">
<pathelement path="OIM_HOME"/>
<fileset dir="${oimclient.jar.classpath}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${com.jar.classpath}">
<include name="**/*.jar"/>
</fileset>
</path>
</classpath>
<jws file="${jws.home}" type="JAXWS" />
</jwsc>
</target>
<target name="deploy">
<!--add wldeploy task here -->
</target>
<target name="clean">
<delete dir="output" />
</target>
</project>
Can you please point out what else is to be done and where exactly am I going wrong in writing the build.xml file.
Let me know if some else information is required.This is what I get when I run the ant task:
Buildfile: C:\JDeveloper\mywork\ProvisioningService_Test2\Provision\resource\build.xml
build-service:
[jwsc] JWS: processing module /com/fox/provision/webservice/endpoint/impl/ProvisionEndPointImpl
[jwsc] Parsing source files
[jwsc] Parsing source files
[jwsc] 1 JWS files being processed for module /com/.../provision/webservice/endpoint/impl/ProvisionEndPointImpl
[jwsc] [JAM] Warning: failed to resolve class org.apache.xmlbeans.XmlObject
[jwsc] [JAM] Warning: failed to resolve class com.bea.xml.XmlObject
[jwsc] [JAM] Warning: failed to resolve class javax.xml.rpc.holders.Holder
[jwsc] JWS: C:\..\...\..\...\code\ProvisioningService\src\com\...\provision\webservice\endpoint\impl\..EndPointImpl.java Validated.
[jwsc] Processing 1 JAX-WS web services...
[jwsc] warning: Specified AnnotationProcessorFactory, 'com.sun.istack.ws.AnnotationProcessorFactoryImpl', not found on search path.
warning: No annotation processors found but annotations present.
2 warnings
[jwsc] Compiling 2 source files to C:\DOCUME~1\....\LOCALS~1\Temp\_lsgijm
[jwsc] Building jar: C:\..\...\..\...\code\ProvisioningService\src\com\...\provision\webservice\deploy\ear_directory\com\fox\provision\webservice\endpoint\impl\...EndPointImpl.war
[jwsc] Created JWS deployment outputFile: C:\..\...\..\...\code\ProvisioningService\src\com\...\provision\webservice\deploy\ear_directory\....\...\provision\webservice\endpoint\impl\..EndPointImpl.war
[jwsc] [EarFile] Application File : C:\..\...\..\...\code\ProvisioningService\src\com\.....\provision\webservice\deploy\ear_directory\META-INF\application.xml
[AntUtil.deleteDir] Deleting directory C:\DOCUME~1\....\LOCALS~1\Temp\_lsgijm
BUILD SUCCESSFUL
Total time: 7 seconds
Due to some limitations, I edited the path in the build.xml files.
Please let me know what can be done. Thanks.
Edited by: user9112073 on Nov 22, 2011 9:52 PM -
Can "SPML Web Service Complex Data Type field" take multiple values ?
In Generic Technology Connector's -SPML design parameters section, Can we give multiple values in SPML Web Service Complex Data Type field?
If not, how can i call methods directly instead of calling them through a values of the "name" attribute of the "complexType" element in SPML Web Service Complex Data Type?
I need 'SPML Web Service Complex Data Type' to hold multiple values.And based on the request it has to initiate appropriate method of action.
Presently i have three methods add,modify and delete which i am calling through a single value of the "name" attribute of the "complexType" element in SPML Web Service Complex Data Type.
I want to replace this single value with multiple menthods , so that a direct interaction between the method,OIM and target can be established.
Edited by: 821054 on 16/02/2011 04:23Thanks Robert.
You'll need to create your own interface to the webapp database for those kind of data operations
by this, are you speaking of the internal BC database which stores web app schema data? That would be great if it were possible to update that programmatically because I need to use the List (Checkbox List) field type (for the search functionality), but I need to supply the checkbox options from a web app rather than by manually updating the list entered in the Fields view of the web app settings (shown below).
I'm curious if anyone else has tried this?
Again, my reason for needing to use the List (Checkbox List) field type is that the page which processes searches knows to expect a comma separated list for this field type and then appears to be parsing out the individual values for searching out web app items with 1 or more matching values. You're right that text fields (string and multiline) just check for 'string contains' matches, and this would be ok if I was only ever needing to search just one value at a time. Here's an example of what I might do:
Web App item field value (as recorded against the List (Checkbox List) field type:
8294877,8294878
Web App Search value (for this same field):
8294879,8294877,8294885
The search would return this web app item because the field contains 2 (1 or more) individual values even though they were entered into the search field in a different order. If this web app item were just a Text (string or multiline) field, the searched value is not a substring of the web app item's stored value, so it would not find a match. Hence the need to use Checkbox List field type.
The web app will have thousands if not 10s of thousands of records, so dumping them all into one big array or object and searching on the front-end won't be practical (though it works great on smaller datasets). -
Building client proxies for web services with SOAP attachemtns
Hi all.
I'm currently building a series of web services that take SOAP attachments as
input, but I am unable to generate the java proxies for testing the services via
WebLogic Workshop 8.1. When I attempt to build the proxy, I get the following
error:
Warning: Failed to generate client proxy from WSDL definition for this service.
Suggestion: Please verify the <types> section of the WSDL.
Is there something I need to alter to get this to work, or does workshop not support
client proxies for web services with DataHandler parameters?
Thanks.
-BrianThanks for the help. This is my first web service with SOAP attachments, so it
may have been a long time till I realized that.
-Brian
"Michael Wooten" <[email protected]> wrote:
>
Thanks Brian,
The problem is that you are trying to use the "document" soap-style :-)
If you change this to "rpc", you'll should be able to successfully generate
the
client proxy jar. The soap-style property, is at the bottom of the "protocol"
property sheet section, for the JWS.
Regards,
Mike Wooten
"Brian McLoughlin" <[email protected]> wrote:
Sure, sorry about that. Attached is the wsdl for a sample web service
I created
just to test the proxy generation.
"Michael Wooten" <[email protected]> wrote:
Hi Brian,
Would it be possible for you to post the WSDL, so we can see what might
be causing
the problem?
Regards,
Mike Wooten
"Brian McLoughlin" <[email protected]> wrote:
Hi all.
I'm currently building a series of web services that take SOAP attachments
as
input, but I am unable to generate the java proxies for testing theservices
via
WebLogic Workshop 8.1. When I attempt to build the proxy, I get the
following
error:
Warning: Failed to generate client proxy from WSDL definition for
this
service.
Suggestion: Please verify the <types> section of the WSDL.
Is there something I need to alter to get this to work, or does workshop
not support
client proxies for web services with DataHandler parameters?
Thanks.
-Brian -
Web service with complex java type
Hi,
I create a web service method with String o with Array of Strings without problem. Now I nedd to create a ws that return a table, so I create a class like this:
public class User {
private String Name;
private String.Surname;
public void setName(String setName){
Name= setName;
public void setSurname(String setSurname){
Surname=setSurname;
In my ws class I use this object:
public User[] getUser(String a){
User[] user = new User[10];
for (int i=0;i<10;i++){
User<i>.setName("aaa");
User<i>.setSurname("bbb");
return user;
When in WebService Perspective I try to create my ws in wizard mode I see method getUser but I can't check it
Where is error?
Thanks
AndreaHI Andrea,
I think with present netweaver developer studio , we can create Web services with end points as simple data types in java and the array of that simple data types.
not sure whether it support our own custom developed classes as end points.
just go through these links.
http://help.sap.com/saphelp_nw2004s/helpdata/en/f7/af60f2e04d0848888675a800623a81/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/f7/af60f2e04d0848888675a800623a81/frameset.htm
from this we will get Restrictions for WS Endpoints.
Regards
Kishor Gopinathan -
Hello,
<br>
<br>
We need to build a web service with a predefined message in our ERP (ABAP), without PI or WebAS JAVA.
<br>
<br>
We thought it should be a simple task, because we had no problem with many other applications and systems when building the same service, but were not able to build it with SAP ABAP, probably as a consequence of our lack of knowledge on ABAP SOAP runtime.
<br>
<br>
We have an external asynchronous process that delivers information to many other systems using web services (information diffusion). Concecuently, the web service call's structure is determined by the caller, so we have to fulfill this structure if we want to receive the info.
<br>
<br>
The owner of the process defined a very simple service call, in which one kind of "record" can be repeated 1 to n times:
<br>
<br>
<br>
<br>
<br>
<br>
<reglasSuscripcion>
<br>
<!Zero or more repetitions:>
<br>
<nombre>?</nombre>
<br>
<valor>?</valor>
<br>
<nombre>?</nombre>
<br>
<valor>?</valor>
<br>
<nombre>?</nombre>
<br>
<valor>?</valor>
<br>
<br>
<nombre>?</nombre>
<br>
<valor>?</valor>
<br>
</reglasSuscripcion>
<br>
<br>
<br>
In order to receive this info, we have to implement an abap web service handler to accept this kind of call, the same way other applications/systems have already done.
<br>
<br>
We tried to build a RFC function call and create a web service with the wizard and it resulted in a web service with the following WSDL:
<br>
<br>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sap-com:document:sap:soap:functions:mc-style">
<br>
<br>
<br>
<br>
<reglasSuscripcion>
<br>
<!Zero or more repetitions:>
<br>
<item>
<br>
<nombre>?</nombre>
<br>
<valor>?</valor>
<br>
</item>
<br>
<br>
<br>
<br>
<item>
<br>
<nombre>?</nombre>
<br>
<valor>?</valor>
<br>
</item>
<br>
</reglasSuscripcion>
<br>
<br>
<br>
<br>
We found two main problems:
<br>
<br>
1.- When "wrapping" the RFC as a WS with the wizard, for a table datatype it automatically includes the <item></item> tag, so we break the predefined calling rules.
<br>
<br>
2.- The namespace is fixed by the wizard, and we would like to use a common namespace for all the "susbscribers", logically, the namespace fixed by the information diffusion service.
<br>
<br>
We also tried to find info on the outside-in approach for building a web service from the WSDL, but all the info we found required the ESR and we have no PI, just the ERP.
<br>
<br>
Any ideas on how to proceed?
<br>
<br>
Thanks in advance,
<br>
<br>
Joseba M. Iturbe
<br>
<br>
Edited by: Soporte Desarrollo on Mar 5, 2010 10:56 AM#2. I've recently had to "zap" some namespaces in an ECC5 system because the calling (TIBCO) system didn't appreciate the default SAP "urn" default - something to do with multiple colons in the address. There were, I think, just three table this affected, all VEP* ones. I think I should have been able to change these via the virtual interface in SE80 except that the ECC5 code was a bit "light" in this respect, so you may be able to do this now in SOAMANAGER in ECC6 (btw, I also had to re-save the WS definition within WSCONFIG and re-activate the virtual interfaces after this "zap" to generated the associated handler class again).
#1. Given your "name / value" pairs represent a complex type, then it might be better practice to have them as "item" which is probably why SAP proposes it this way... what does your custom function module parameter list look like?
Jonathan -
Hey guys,
I am quite new in using BPEL. My first test worked fine, but know I have an issue, which I can not solve. Invoking web services with a basic return value is no problem. I could also you a dto object including some basic variables in order to invoke the web service without having problems.
But when I have a dto object as return value, I get the following exception.
Could someone give me a hint to fix my problem...that would be great!
Thanks alot!
Sven
<messages>
- <input>
- <carReserveRequest>
- <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="in0">
- <in0 xmlns="" xmlns:def="urn:TravelBooking" xsi:type="def:CarReservationDTO" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<carType>
Mini
</carType>
<customerName>
9
</customerName>
<customerPhone>
9
</customerPhone>
<reservationEnd>
2030-12-12T00:00:00.000+01:00
</reservationEnd>
<reservationStart>
2029-12-12T00:00:00.000+01:00
</reservationStart>
</in0>
</part>
</carReserveRequest>
</input>
- <fault>
- <remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
- <part name="summary">
<summary>
exception on JaxRpc invoke: trailing block elements must have an id attribute
</summary>
</part>
</remoteFault>
</fault>
</messages
Message was edited by:
user606281Here is more information. Below are the relevant sections of the web service's WSDL which I am trying to call from BPEL:
- <wsdl:message name="getNextIDResponse">
<wsdl:part name="part1" element="ns0:getNextIDResponse" />
</wsdl:message>
- <wsdl:message name="getNextIDFault">
<wsdl:part name="part1" element="ns0:SOAPExceptionFault" />
</wsdl:message>
<wsdl:message name="getNextIDMessage" />
- <wsdl:portType name="GetUniqueIDPortType">
- <wsdl:operation name="getNextID">
<wsdl:input message="axis2:getNextIDMessage" wsaw:Action="urn:getNextID" />
<wsdl:output message="axis2:getNextIDResponse" />
<wsdl:fault name="getNextIDFault" message="axis2:getNextIDFault" />
</wsdl:operation>
</wsdl:portType> -
HotFix 2 breaks web service results of type xsd:anyType
I have a client that accesses a number of web services that
return results as type xsd:anyType (the results are complex XML
hierarchies that change according to db values). Before HotFix 2,
in in my ResultEvent.RESULT event handler, I could get access to
the result via the ResultEvent.result property. But since HotFix 2,
the ResultEvent.result property is always null for web services
results of type xsd:anyType (for other result types,
ResultEvent.result is correct).
This is a major nuisance!! I assume this is a bug, so can
anyone suggest any workarounds while I wait for Adobe to fix it? I
can access the result as a string via the EventResult.message.body
member. And from there, I can parse the XML, and perform an
XML-to-ValueObject conversion... does that sound reasonable? Does
anyone have an examples of XML-to-ValueObject conversion code to
help get me started?
Any hints or tips would be most welcome ;)
Thanks!
Paul C.This has become a huge problem for me... it's boken my
applications in *many* places :(
Is there no-one with any suggestions?
Paul C. -
Calling Reporting Services Web Service with jQuery possible?
Hi,
is it possible to call the Reporting Services Web Service with jQuery? If yes, can someone post me a small example?
Background:
My plan is to create a html with a form which is also uploaded then into the reportserver. I open this html later by clicking a link in a report (with gotoURL open.window). The report opens the html inclusive the overtaken of some additional parameters
(reportname, reportdescription). These parameters I will use in the html-form as defaultvalues for the corresponding input-text-fields. Now the user can make some changes (i.e. the decription). With a click on a button I will send the new description to
the Reporting Services Web Service by using the SetProperties method, closing the html-window and reload the report. Important is that I want to upload the html also into the reportserver itself.
I have already found how to consume a web service via jQuery but with the Reporting Services Web Service I did not get it running in my tests.
I have referenced to the following jQuery.js: http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js
Here you can see my tests I made with the results:
$.ajax({
type: 'POST',
url: 'http://<..>/ReportServer/ReportService2010.asmx/ListChildren',
data: {'ItemPath':'/','Recursive':false},
complete: function(xData, status) {
$('p').html($(xData.responseXML).text()); // result
$("#divStatus").text( status ); // status }
I got a NULL response with Status success. But where are the items?
Another test which should response only one value was that:
$.ajax({
type: "POST",
contentType: "text/xml; charset=utf-8",
url: "http://<..>/ReportServer/ReportService2010.asmx/GetItemType",
data: {"Item":"/Development"}, // Development is a Folder in my Reportserver-Root
dataType: "xml",
success: function (msg) {
$("#divResult").html(msg.responseXML);
error: function (data, status, error) {
$("#divResult").html("WebSerivce unreachable<br> <br>" + data.responseXML + "<br> <br>(" + error + ")");
Here I got an [object Error]
And here my last test:
var soapMessage = '<?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>\
<GetItemType xmlns="http://www.microsoft.com/sql/ReportingServer">\
<ItemPath>/Development</ItemPath>\
</GetItemType>\
</soap:Body>\
</soap:Envelope>';
$.ajax({
type: "POST",
contentType: "text/xml; charset=utf-8",
url: http://<..>/ReportServer/ReportService2010.asmx?wsdl,
data: soapMessage,
dataType: "xml",
success: processSuccess,
error: processError
function processSuccess(data, status, req) {
if (status == "success")
$("#response").text($(req.responseXML).find("Type").text());
function processError(data, status, req) {
alert(req.responseText + " " + status);
Here I got an "Undefined error"
Can anyone help me?
Thanks
René IllnerHi Rene,
I have one vbscript class to call web services. May be if you need you can use it.
dim ws
set ws = new webservice
ws.url = "http://servername/ReportServer/ReportService2010.asmx"
ws.method = "MethodName"
ws.parameters.Add "Parameter1", "Param1 Desc.."
ws.parameters.Add "Parameter2","[email protected].."
ws.execute
set ws = nothing
'------web service calling class
class WebService
public Url
public Method
public Response
public Parameters
public function execute()
dim xmlhttp
Set xmlhttp = CreateObject("Microsoft.XMLHTTP")
xmlhttp.open "POST", Url & "/" & Method, false
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlhttp.send Parameters.toString
response = xmlhttp.responseText
set xmlhttp = nothing
end function
Private Sub Class_Initialize()
Set Parameters = new wsParameters
End Sub
Private Sub Class_Terminate()
Set Parameters = Nothing
End Sub
End class
class wsParameters
public mCol
public function toString()
dim nItem
dim buffer
buffer = ""
for nItem = 1 to Count
buffer = buffer & Item(nItem).toString & "&"
next
if right(buffer,1)="&" then
buffer = left(buffer,len(buffer)-1)
end if
toString = buffer
end function
public sub Clear
set mcol = nothing
Set mCol = CreateObject("Scripting.Dictionary")
end sub
public sub Add(pKey,pValue)
dim newParameter
set newParameter = new wsParameter
newParameter.Key = pKey
newParameter.Value = pValue
mCol.Add mCol.count+1, newParameter
set newParameter = nothing
end sub
public function Item(nKey)
set Item=mCol.Item(nKey)
end function
public function ExistsXKey(pKey)
dim nItem
for nItem = 1 to mcol.count
if mCol.Item(nItem).key = pKey then
ExistsXKeyword = true
exit for
end if
next
end function
public sub Remove(nKey)
mCol.Remove(nKey)
end sub
public function Count()
Count=mCol.count
end function
Private Sub Class_Initialize()
Set mCol = CreateObject("Scripting.Dictionary")
End Sub
Private Sub Class_Terminate()
Set mCol = Nothing
End Sub
end class
class wsParameter
public Key
public Value
public function toString()
toString = Key & "=" & Value
end function
end class
Regards, RSingh -
Calling web service with basic authentication from EP "unauthorized"
Hello,
I need to call a .NET web service with basic authentication on the IIS from my portal application (no http proxy between portal and IIS). But always I get the following exception:
<b>com.sap.engine. services.webservices.jaxm.soap.accessor. NestedSOAPException:
Problem in server response: [Unauthorized].</b>
I'm using the following code for calling the .NET web service:
<b>...</b><i>Licence_GetList lParameter = new Licence_GetList();
lParameter.setStatus(CEnvironment.TransformStatus_WebService(search));
ILicenceManager lLicMan = (ILicenceManager) PortalRuntime.getRuntimeResources().getService("LicenceManager");
ILicenceManager lLicManSecure = lLicMan.getSecurisedServiceConnection(request.getUser());
Licence_GetListResponse lGetListResponse = lLicManSecure.Licence_GetList(lParameter);</i><b>...</b>
I've also configured a http system in the portal system landscape using the following parameters:
<i>Authentication Method : Basic Authentication
Authentication Type : Server
User Mapping Type : admin,user</i>
The user mapping is also personalized for this system!
What's wrong? Please help! This is really urgent!
Kind Regards
Joerg LoechnerHello Renjith,
here is a small cutout of my "portapp.xml";
<services>
<service alias="LicenceManager" name="LicenceManager">
<service-config>
<property name="className" value="de.camelotidpro.
pct.xi.scm.webservice.LicenceManager"/>
<property name="startup" value="false"/>
<property name="WebEnable" value="false"/>
<property name="WebProxy" value="true"/>
<property name="SecurityZone" value="de.camelotidpro.
pct.xi.scm.webservice.LicenceManager/
DefaultSecurity"/>
</service-config>
<service-profile>
<property name="SystemAlias" value="LicMan_NET"/
</service-profile>
</service>
</services>
I'm using a http system created in the system landscape (alias LicMan_NET). But it seems that this system is not used by the web service call (No error, even if I delete this system!). The code used to call this web service can be found at the top of this threat...
Regards
Joerg Loechner -
Web services with servicegen i Weblogic 7
I am trying to create web services with Weblogic's tool servicegen and
ANT. It works great until I have a web service method that return a PK
class of an EJB. I get the error "Error: bean property and public
field found with the same name: id" (full stacktrace below). After
some investigating I found out that it was my PK class that was the
bad guy. But my PK class MUST have the field "id" public, otherwise
ejbc complains...
Am I doing anything wrong or does anyone have a solution?
/Weasel
webservices:
[servicegen] Generating service "HelloWorldEJB" ...
[servicegen] Generating XML types and serializers from ejb-jar
(E:\java\projects\CMP20CMR-xdoclet\build\ejb\weblogic-ejb\samples-ejb.jar)
[servicegen] weblogic.xml.schema.binding.BindingException: Error: bean
property and public field found with the same name: id
[servicegen] at weblogic.ant.taskdefs.webservices.autotype.AutoTypeTask.execute(AutoTypeTask.java:356)
[servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.generateService(ServiceGenTask.java:248)
[servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.execute(ServiceGenTask.java:141)
[servicegen] at org.apache.tools.ant.Task.perform(Task.java)
[servicegen] at org.apache.tools.ant.Target.execute(Target.java)
[servicegen] at org.apache.tools.ant.Target.performTasks(Target.java)
[servicegen] at org.apache.tools.ant.Project.executeTarget(Project.java)
[servicegen] at org.apache.tools.ant.Project.executeTargets(Project.java)
[servicegen] at org.apache.tools.ant.Main.runBuild(Main.java)
[servicegen] at org.apache.tools.ant.Main.start(Main.java)
[servicegen] at org.apache.tools.ant.Main.main(Main.java)
[servicegen] --- Nested Exception ---
[servicegen] weblogic.xml.schema.binding.BindingException: Error: bean
property and public field found with the same name: id
[servicegen] at weblogic.ant.taskdefs.webservices.autotype.ComponentAutoTyper.mapComponent(ComponentAutoTyper.java:157)
[servicegen] at weblogic.ant.taskdefs.webservices.autotype.EJBAutoTyper.run(EJBAutoTyper.java:100)
[servicegen] at weblogic.ant.taskdefs.webservices.autotype.AutoTypeTask.execute(AutoTypeTask.java:350)
[servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.generateService(ServiceGenTask.java:248)
[servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.execute(ServiceGenTask.java:141)
[servicegen] at org.apache.tools.ant.Task.perform(Task.java)
[servicegen] at org.apache.tools.ant.Target.execute(Target.java)
[servicegen] at org.apache.tools.ant.Target.performTasks(Target.java)
[servicegen] at org.apache.tools.ant.Project.executeTarget(Project.java)
[servicegen] at org.apache.tools.ant.Project.executeTargets(Project.java)
[servicegen] at org.apache.tools.ant.Main.runBuild(Main.java)
[servicegen] at org.apache.tools.ant.Main.start(Main.java)
[servicegen] at org.apache.tools.ant.Main.main(Main.java)
[servicegen] --- Nested Exception ---
[servicegen] weblogic.xml.schema.binding.BindingException: Error: bean
property and public field found with the same name: id
[servicegen] at weblogic.xml.schema.binding.internal.codegen.JavaInspector.checkForFieldConflict(JavaInspector.java:384)
[servicegen] at weblogic.xml.schema.binding.internal.codegen.JavaInspector.addPropertiesToScalar(JavaInspector.java:345)
[servicegen] at weblogic.xml.schema.binding.internal.codegen.JavaInspector.fillDescriptor(JavaInspector.java:152)
[servicegen] at weblogic.xml.schema.binding.internal.codegen.JavaInspector.getDescriptor(JavaInspector.java:115)
[servicegen] at weblogic.xml.schema.binding.internal.codegen.JavaInspector.createDescriptorForClass(JavaInspector.java:90)
[servicegen] at weblogic.xml.schema.binding.internal.codegen.Compiler.compile(Compiler.java:121)
[servicegen] at weblogic.xml.schema.binding.internal.XSDTypeMappingBuilder.mapClass(XSDTypeMappingBuilder.java:88)
[servicegen] at weblogic.xml.schema.binding.internal.XSDTypeMappingBuilder.mapClass(XSDTypeMappingBuilder.java:101)
[servicegen] at weblogic.xml.schema.binding.internal.TypeMappingBuilderBase.addMapping(TypeMappingBuilderBase.java:176)
[servicegen] at weblogic.ant.taskdefs.webservices.autotype.ComponentAutoTyper.addMapping(ComponentAutoTyper.java:85)
[servicegen] at weblogic.ant.taskdefs.webservices.autotype.ComponentAutoTyper.mapComponent(ComponentAutoTyper.java:113)
[servicegen] at weblogic.ant.taskdefs.webservices.autotype.EJBAutoTyper.run(EJBAutoTyper.java:100)
[servicegen] at weblogic.ant.taskdefs.webservices.autotype.AutoTypeTask.execute(AutoTypeTask.java:350)
[servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.generateService(ServiceGenTask.java:248)
[servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.execute(ServiceGenTask.java:141)
[servicegen] at org.apache.tools.ant.Task.perform(Task.java)
[servicegen] at org.apache.tools.ant.Target.execute(Target.java)
[servicegen] at org.apache.tools.ant.Target.performTasks(Target.java)
[servicegen] at org.apache.tools.ant.Project.executeTarget(Project.java)
[servicegen] at org.apache.tools.ant.Project.executeTargets(Project.java)
[servicegen] at org.apache.tools.ant.Main.runBuild(Main.java)
[servicegen] at org.apache.tools.ant.Main.start(Main.java)
[servicegen] at org.apache.tools.ant.Main.main(Main.java)
BUILD FAILED
E:\java\projects\CMP20CMR-xdoclet\script\build.xml:498:
weblogic.xml.schema.binding.BindingException: Error: bean property and
public field found with the same name: idWeb services can only be published to BEA if you install Apache SOAP on BEA and use the Apache SOAP option of JDeveloper. The J2EE Web Services implementation framework is specific to Oracle9iAS.
The PL/SQL Web Services server implementation is based on the J2EE Web Services option and as a result is not really portable to BEA.
To publish a PL/SQL Web service on BEA with JDeveloper you would have to write the Java wrapper code to invoke the stored procedure using standard JDBC and then publish that Java class as a Web service using Apache SOAP. Then if you had Apache SOAP installed on BEA you would be set.
Portability of Web services implementations is a big feature coming with JAX-RPC - currently what most vendors have is interoperability between implementations because of things like SOAPBuilders and WS-I. When JAX-RPC becomes part of J2EE 1.4 roughly in June and vendors start putting out implementations on it you should get closer to portability.
In the meantime, the easiest way to get portability is to use the same SOAP server on both servers - Apache SOAP is a good example.
Hope this helps.
Mike -
Accessing IRM Web Services with Coldfsuion
We are looking to use the IRM web services with Coldfusion. Coldfusion abstracts Web Services calls through Java calls to the point of just setting up structures and calling the functions.
My question is about the process for building the correct parameters for the IRM services. I have the JDeveloper examples working but I can't make enough sense of what is goin on through all the calls to build the proper information.
What I don't understand yet are things like where do I get the server key and at what point do I authenticate? Do I need to do separate calls for these things.
I've captured a soap transaction for the update user example in JDeveloper and see there is a serverKey but no other authentication. Is this all I need?
The web services documentation mentions authentication needs to be basic authentication. Other than that there is not more info. Is there any other source of info?Hi
Sorry, things are a bit confused when it comes to Web Services (WS) documentation. At the moment (in 10g), it's mixed up with the older stuff in the Component API Help file. Also, apart from a few snippets and the JDeveloper examples, there is no WS sample code. We hope to address this in 11g.
The web services required HTTP basic authentication details to be set before the call is invoked. This will be the username and password of the sealing user, so that user will need to be configured to use Standard Auth, rather than NT Auth. How to set this depends on the web service stack used on the client, but with JAX-RPC there are APIs that allow the user name and password to be specified. e.g.
+// User name for authentication purposes+
contextServices._setProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY,args[1]);
+// Password for authentication purposes+
contextServices._setProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY,args[2]);
This snippet is in the Help file under the header "Authentication", or directly via:
mk:@MSITStore:C:\Program%20Files\SealedMedia\Enterprise%20APIs%20SDK\Components%20SDK\Docs\smcomponents.chm::/ws_documentation_authentication.htm
As for the Server Key, each IRM Server has a unique UUID value. The easiest way to get this is to call the following web service method on the “ServerServices” web service port.
LicenseServer_ref reference = serverServices.getLicenseServerReference();
System.out.println(reference.getServerKey());
One you’ve obtained this it will never change (for the server you are using) and can be cached or stored for all future web service calls.
I think you need to have the auth properties set, and the Server Key handy, for most WS methods to work, but I don't think it matters in which order you get them.
Hope this helps,
David
Maybe you are looking for
-
The display of my MacBookPro Penryn is 262k colours! Dithering! Terrible!
Hi everyone! My name is Marco and I'm a new mac user from Italy... 30 days ago I bought a new Penryn MacBookPro 2.5 Ghz 15" matte in order to use it for my photographic work... today I was using it to open some nefs taken with my Nikon D300... macro
-
Everytime I take a photo on my phone either when it is locked or not, when I come back to my phone to use it next the lock screen has zoomed in and I can not enter my password. I have to either switch the phone off or keep playing with the side butto
-
Sender Party Alternative Identifier Problem.
HI All, I have a B2B scenario in which I have configured following things in Integration Directory 1.Sender party as PartyA Business System-->ABC_001 with logical system as ABC_001. 2. Receiver party as PartyB. Business Service--->
-
Extended sytax check read error message
hi every one, i am working on extended syntax check for the report and in warning i am getting this message to a defiend itab or variable.: "No read access to table ITAB[] ",same messages for string variables too. please let me know how to remove thi
-
Playing windows games on my iMac?
I have a pretty good iMac I bought it about 18 months so it's not the brand new one it has 8 gig memory and I have just installed mavericks. I am getting frustrated that I can't buy a lot of the games I see advertised. I really want to buy Skyrim but