Web Service created out of Business Object
Hello All,
Has anyone created a Web Service using a Business Object?
When I am trying to create a Web Service, I can see the couple of options like Business Objects, Process Agents are disabled and rest like Consumer Group, Service Provider are enabled. Any idea why this is happening.
Regards,
Abhishek
Hi Ansh,
Thanks for your quick revert and suggestions, and sorry for the delay on my part to get back to you.
Trouble with hosting the packaged app WS on local machine was that the packaged app is a big memory hog and would have been impossibe to host that along with my oracle db, jdeve, wls, mobile lite server etc on my 4 GB RAM thing.
But what we did yesterday was to host the oracle demo web service (as mentioned in step 1 of part 4 of the tutorial of this mobile adf FOD demo) on another machine in the network, and we were successfully able to invoke it via the mobile adf client built and deployed on a BB simulator on my machine....so that definitely tells me that network and my packaged app WS being on another machine is not the problem.
So now, the only reason, which is what i was guessing all along but confirmed for sure now, is that my action listener is not working or is unable to trigger the web service call at all.
This explains why there is no movement on the MDS-CS window.
And so as per your explanation, if I use a applicationscop variable in the "to" argument of my action listener, and I provide the same value in the binding property in # 19 of step 2 of part 4 of that tutorial right?
One more query I had was that the single input argument of my WS is a varchar, similar to the dept id integer "arg0" of the demo pojo web service given by oracle in the tutorial, but while in this # 19 screenshot of the tutorial it shows the data type as integer, in my case it comes as java.lang.object.....is there something wrong in the way my WS input definition is created etc? Can that be preventing the WS from getting invoked?
Appreciate all your help on this please!
Regards,
Hemant
Similar Messages
-
Can we access tables created internally for Business objects in CAF
Hi,
When we create and Deploying Business objects in CAF then internally it creates tables in Oracle/Maxdb database. Can we access those tables through CAF.
Or is it possible for Oracle to access the Business objects tables which are deployed on SAP Web Application server?
We can configure the Oracle driver in the SAP Web App Server. But how can we use it?Hi Rohit!
Can we access the tables created internally for BO's without the use of CRUD methods provided by them.?
Or
Can we fire queries on these tables through Oracle.? As the tables are created along with BO's in the database.
Maybe, you can do that, but why do you want to do that?
Based on the Entity Services (i.e., CRUD and find operations) that are generated for your BOs, you can implement Application Services which contain any business operation that you want to perform. Furthermore, you can expose your Application Services as Web Services. That's the designated way to do that.
Manually manipulating the underlying database tables does not sound like a good idea.
Best regards
Alexander -
Invoke web service created from workshop
Hi,
I am trying to write a stand alone java client to connect to web service created
from workshop( please see the attached wsdl file), but can't get it work. Did
somebody know why. Here is my java client code :
import java.net.URL;
import javax.xml.rpc.ServiceFactory;
import javax.xml.rpc.Service;
import javax.xml.rpc.Call;
import javax.xml.namespace.QName;
import weblogic.webservice.context.WebServiceContext;
import weblogic.webservice.context.WebServiceSession;
import weblogic.webservice.context.WebServiceHeader;
public class OrderTestClient {
public static void main(String[] args) {
try {
// Setup the global JAXM message factory
System.setProperty("javax.xml.soap.MessageFactory",
"weblogic.webservice.core.soap.MessageFactoryImpl");
// Setup the global JAX-RPC service factory
System.setProperty("javax.xml.rpc.ServiceFactory",
"weblogic.webservice.core.rpc.ServiceFactoryImpl");
// create service factory
ServiceFactory factory = ServiceFactory.newInstance();
// define qnames
//String targetNamespace = "http://localhost/orderweb";
String targetNamespace = "http://www.openuri.org/";
QName serviceName = new QName(targetNamespace, "newsmlorder");
QName portName = new QName(targetNamespace, "newsmlorderSoap");
//QName operationName = new QName("tns:newsmlorderSoap", "getUserAddress");
QName operationName = new QNam("http://localhost:7021/orderweb/", "getUserAddress");
URL wsdlLocation = new URL("http://localhost:7021/orderweb/newsmlorder.jws?WSDL");
// create service
Service service = factory.createService(wsdlLocation, serviceName);
// create call
Call call = service.createCall(portName, operationName);
WebServiceContext wsContext = WebServiceContext.currentContext();
WebServiceSession session =(WebServiceSession)wsContext.getSession();
System.out.println(" Session : " + session.toString() );
System.out.println(" == step 11 ===");
// invoke the remote web service
System.out.println(" == step 12 ===");
String result = (String) call.invoke(new Object[] {"testPing"});
System.out.println("test result : " + result);
catch (Exception e) {
System.out.println("test result : " + e.getMessage());
[order.wsdl]Hi,
I did not get any error, however the service call is always return null even though
I hard code return String, so I knew it failed.
I tried your following code and it worked. You mention that I have to download
proxy.jar from workshop overview page, but I can't find it. Would you please tell
me where to find the download menu in workshop.
If I want to build a dynamic stand alone client to invoke service created from
workshop ( my original approach), what should I do?
I am trying to use workshop to handle multipart soap message (soap message with
attachments), could you please send me a example ?
Very appreciate your help!
Thanks again.
Lina
Vimala Ranganathan" <[email protected]> wrote:
>
>
>
Hi Lina,
Are you getting any errors?
Did you happen to try with a static client? Is that working?
(For static client you have to download the proxy jar from the workshop
overview
page and have it in the classpath)
I have attacjhed the proxy jar and here is a sample client. Let me know
how this
goes.
public class Test
public static void main(String [] args)
Newsmlorder_Impl m_proxyImpl = null;
NewsmlorderSoap m_proxy = null;
try
m_proxyImpl = new Newsmlorder_Impl();
catch (IOException ex)
System.out.println("Error getting proxy");
ex.printStackTrace();
m_proxy = m_proxyImpl.getnewsmlorderSoap();
GetUserAddress p = m_proxy.getUserAddress();
Thanks a lot,
Vimala Ranganathan
"Lina Li" <[email protected]> wrote:
Hi,
I am trying to write a stand alone java client to connect to web service
created
from workshop( please see the attached wsdl file), but can't get itwork.
Did
somebody know why. Here is my java client code :
import java.net.URL;
import javax.xml.rpc.ServiceFactory;
import javax.xml.rpc.Service;
import javax.xml.rpc.Call;
import javax.xml.namespace.QName;
import weblogic.webservice.context.WebServiceContext;
import weblogic.webservice.context.WebServiceSession;
import weblogic.webservice.context.WebServiceHeader;
public class OrderTestClient {
public static void main(String[] args) {
try {
// Setup the global JAXM message factory
System.setProperty("javax.xml.soap.MessageFactory",
"weblogic.webservice.core.soap.MessageFactoryImpl");
// Setup the global JAX-RPC service factory
System.setProperty("javax.xml.rpc.ServiceFactory",
"weblogic.webservice.core.rpc.ServiceFactoryImpl");
// create service factory
ServiceFactory factory = ServiceFactory.newInstance();
// define qnames
//String targetNamespace = "http://localhost/orderweb";
String targetNamespace = "http://www.openuri.org/";
QName serviceName = new QName(targetNamespace, "newsmlorder");
QName portName = new QName(targetNamespace, "newsmlorderSoap");
//QName operationName = new QName("tns:newsmlorderSoap","getUserAddress");
QName operationName = new QNam("http://localhost:7021/orderweb/",
"getUserAddress");
URL wsdlLocation = new URL("http://localhost:7021/orderweb/newsmlorder.jws?WSDL");
// create service
Service service = factory.createService(wsdlLocation, serviceName);
// create call
Call call = service.createCall(portName, operationName);
WebServiceContext wsContext = WebServiceContext.currentContext();
WebServiceSession session =(WebServiceSession)wsContext.getSession();
System.out.println(" Session : " + session.toString() );
System.out.println(" == step 11 ===");
// invoke the remote web service
System.out.println(" == step 12 ===");
String result = (String) call.invoke(new Object[] {"testPing"});
System.out.println("test result : " + result);
catch (Exception e) {
System.out.println("test result : " + e.getMessage()); -
Issues in Web service created for updating the Sales Order
Hi All,
We created a Web service using the Web service tool in CRM 7.0 ( Using the Component WS_DESIGN_TOOLS )
Web service was created for three modes such as READ, CREATE and CHANGE Modes.
READ Web Service we tested and its working fine as we were able to see the data for an existing Sales Order in the Web Service.
We expect that the Change Web Service will update the data of an existing Sales Order.
Through our Web service we are passing the Order GUID ,Order ID and some Header Fields as well as Item Fields but the in the Web Service we are getting a message that Web service executed successfully but the CRMD_ORDERADM_H Table isnot getting updated.
What could be problem.
Any suugestions will be highly appreciated.
Regards,
SijoHi Gourav,
I checked in SICF for the Webservice name created.
this is the service path
/default_host/sap/bc/srt/rfc/sap/ for the corresponding Web Service created in DEV 200 Client.
I checked in SOAMANAGER and saw that the endpoitnts were zero.
the Search Operation for Webservice have got three query fields mainly
Object Id, Posting Date,Procees Type
If we give Process Type
sign - blank
option - blank
low - YPO ( Custom )
High - blank we are getting 126 entries.
and if we check for the Process Type YPO (Custom ) in CRMD_ORDERADM_H Tbale also we are getting the same no of entries.
but only for option BT , for Posting Date issue is thr..
Any inputs to move forward will be highly appreciated.
Regards,
Sijo.
Edited by: sijokjohn85 on Mar 5, 2010 10:52 PM -
Problem consuming web service created by ABAP via standalone java client
I'm trying to consume web service created by ABAP in R3 system via standalone java client. I should be getting a string reply after consumed the web service (ZSMS_INBOUND), but so far i received null. I cant find any exception or log to trace the problem. Any help would be appreciated. Is there anything wrong with my client calling the web service?
public void myMethod{
// TODO : Implement
try{
Stub stub = (Stub)new ZSMS_INBOUNDServiceImpl().getLogicalPort();
stub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,"http://mytest:8080/sap/bc/srt/rfc/sap/ZSMS_INBOUND?sap- client=100&wsdl=1.1&mode=sap_wsdl");
inboundService = (ZSMS_INBOUND) stub;
BAPIRET2 str = inboundService.ZSMS_INBOUND(date, message, modemId, smsId, tel, time);
ackDeliveryArray<i> = str.toString();
}catch (Exception e) {
e.printStackTrace();
Generated following SAP help standalone proxy creation steps.
***files fr SEIs
ZSMS_INBOUND.java (interface)
ZSMS_INBOUNDService.java (interface)
ZSMS_INBOUNDServiceImpl.java
ZSMS_INBOUNDSoapBindingStub.java
***files fr Proxy classes
ZSMS_INBOUND.java
ZSMS_INBOUNDResponse.java
BAPIRET2.java
.... many more files
the wsdl is as below (generated by ABAP):
<?xml version="1.0" encoding="utf-8" ?>
- <wsdl:definitions targetNamespace="urn:sap-com:document:sap:rfc:functions" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:n0="http://www.sap.com/webas/630/soap/features/authentication/" xmlns:sap="http://www.sap.com/webas/630/wsdl/features" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:sap-com:document:sap:rfc:functions" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <wsdl:types>
- <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:sap-com:document:sap:rfc:functions" targetNamespace="urn:sap-com:document:sap:rfc:functions" elementFormDefault="unqualified" attributeFormDefault="qualified">
- <xsd:simpleType name="char1">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="1" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="char10">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="10" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="char17">
+ <xsd:restriction base="xsd:string">
<xsd:maxLength value="17" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="char170">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="170" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="char20">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="20" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="char220">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="220" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="char30">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="30" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="char32">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="32" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="char50">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="50" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="date">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="10" />
<xsd:pattern value="\d\d\d\d-\d\d-\d\d" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="numeric3">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="3" />
<xsd:pattern value="\d*" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="numeric6">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="6" />
<xsd:pattern value="\d*" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="time">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="8" />
<xsd:pattern value="\d\d:\d\d:\d\d" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:complexType name="BAPIRET2">
- <xsd:sequence>
<xsd:element name="TYPE" type="tns:char1" />
<xsd:element name="ID" type="tns:char20" />
<xsd:element name="NUMBER" type="tns:numeric3" />
<xsd:element name="MESSAGE" type="tns:char220" />
<xsd:element name="LOG_NO" type="tns:char20" />
<xsd:element name="LOG_MSG_NO" type="tns:numeric6" />
<xsd:element name="MESSAGE_V1" type="tns:char50" />
<xsd:element name="MESSAGE_V2" type="tns:char50" />
<xsd:element name="MESSAGE_V3" type="tns:char50" />
<xsd:element name="MESSAGE_V4" type="tns:char50" />
<xsd:element name="PARAMETER" type="tns:char32" />
<xsd:element name="ROW" type="xsd:int" />
<xsd:element name="FIELD" type="tns:char30" />
<xsd:element name="SYSTEM" type="tns:char10" />
</xsd:sequence>
</xsd:complexType>
- <xsd:element name="ZSMS_INBOUND">
- <xsd:complexType>
- <xsd:sequence>
<xsd:element name="DATE" type="tns:date" />
<xsd:element name="MESSAGE" type="tns:char170" />
<xsd:element name="MODEMID" type="tns:char10" />
<xsd:element name="SMSID" type="tns:char17" />
<xsd:element name="TEL" type="tns:char20" />
<xsd:element name="TIME" type="tns:time" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
- <xsd:element name="ZSMS_INBOUNDResponse">
- <xsd:complexType>
- <xsd:sequence>
<xsd:element name="RETURN" type="tns:BAPIRET2" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
- <wsdl:message name="ZSMS_INBOUND">
<wsdl:part name="parameters" element="tns:ZSMS_INBOUND" />
</wsdl:message>
- <wsdl:message name="ZSMS_INBOUNDResponse">
<wsdl:part name="parameters" element="tns:ZSMS_INBOUNDResponse" />
</wsdl:message>
- <sap:Feature name="design_0" uri="http://www.sap.com/webas/630/soap/features/authentication/">
- <sap:Property qname="n0:AuthenticationLevel">
<sap:Option value="n0:None" />
</sap:Property>
</sap:Feature>
- <wsdl:portType name="ZSMS_INBOUND">
<sap:useFeature feature="tns:design_0" />
- <wsdl:operation name="ZSMS_INBOUND">
<wsdl:input message="tns:ZSMS_INBOUND" />
<wsdl:output message="tns:ZSMS_INBOUNDResponse" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="ZSMS_INBOUNDSoapBinding" type="tns:ZSMS_INBOUND">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="ZSMS_INBOUND">
<soap:operation soapAction="" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="ZSMS_INBOUNDService">
- <wsdl:port name="ZSMS_INBOUNDSoapBinding" binding="tns:ZSMS_INBOUNDSoapBinding">
<soap:address location="http://mytest:8080/sap/bc/srt/rfc/sap/ZSMS_INBOUND?sap-client=100" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>I'm now able to consume the web service, but with the error as below:
Warning ! Protocol Implementation [com.sap.engine.services.webservices.jaxrpc.wsdl2java.features.builtin.MessageIdProtocol] could not be loaded (NoClassDefFoundError) !
Error Message is :com/sap/guid/GUIDGeneratorFactory
BAPIRET2 mappingInfo:
TYPE TYPE false false 11
ID ID false false 11
NUMBER NUMBER false false 11
MESSAGE MESSAGE false false 11
LOG_NO LOG_NO false false 11
LOG_MSG_NO LOG_MSG_NO false false 11
MESSAGE_V1 MESSAGE_V1 false false 11
MESSAGE_V2 MESSAGE_V2 false false 11
MESSAGE_V3 MESSAGE_V3 false false 11
MESSAGE_V4 MESSAGE_V4 false false 11
PARAMETER PARAMETER false false 11
ROW ROW false false 11
FIELD FIELD false false 11
SYSTEM SYSTEM false false 11
My java code is :
public class MyTest {
public static void main(String[] args){
try{
Stub stub = (Stub)new ZSMS_INBOUNDServiceImpl().getLogicalPort();
stub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,"http://mytest:8080/sap/bc/srt/rfc/sap/ZSMS_INBOUND?sap-client=100");
ZSMS_INBOUND inboundService = (ZSMS_INBOUND) stub;
BAPIRET2 str = inboundService.ZSMS_INBOUND(param1,param2,param3,param4,param5,param6);
System.out.println(str.toString());
}catch (Exception e) {
e.printStackTrace(); -
Dir API - Web services Time out
Hi All,
I am using Dir API web services to make some mass updates to Config objects. I have developed a client in Java and was able to access/edit the ID objects. The problem I am facing is since the number of objects in the change list is huge ( >1000), the web services time out.
I tried to set the time out parameter for the web service call using
context.put(BindingProviderProperties.REQUEST_TIMEOUT, 600*1000);
also,
context.put("com.sun.xml.ws.connect.timeout", 600*1000);
context.put("com.sun.xml.ws.request.timeout", 600*1000);
None of them seem to have any impact.
Any ideas what is the correct way to adjust this time out behaviour?
Thanks
JaiHi RK,
Thanks for that. I am not looking at changing the time outs at Server. I am just interested in changing the time outs for the request I make from the client. The point is I do not want to impact any other services running in the server.
In WS Navigator, it seems possible to change the time out value using Invocation parameters. (Did not try this yet!!)
So it must be possible to set the time out for the request from the client.
Thanks
Jai
Edited by: Jaishankar on Aug 25, 2011 2:49 PM -
Problem with create universe on Business Objects XI 3.1 base on SAP Query
Hello,
I have a problem with create universe on Business Objects XI 3.1 base on SAP Query.
The problem is hierarchy. Massage on Busines Objects is :
OWBS_ELEMT__ISTKOSZT(cube ICPC01/BEX_ICOC01):Exception condition "HIERARCHY NOT FOUND" raised.(WIS 10901)
Query in BEX run OK.
Best regards.
Ela.Hello,
Thanks for response.
When I run BEX QUERY, all works OK.
All hierarchies was created and activated on system BW.
This situation appears after upgrade BW to SAP NetWeaver 7.3.
Before upgrade I created universe without any problems.
Regards Ela -
Adding Faults to Web Services created from JCDs
Is anyone aware of a way to add faults, other than the default JavaException, to the service definition of a web service created from a JCD?
Hi
You could use se80 and click "Repository Information system"->Enterprise Services->
Service Definitions->search your WebService Defition->Delete it. -
Creating simple Web Services from Plain Old Java Objects (PoJo)
This post is with reference to a sun web page at URL - http://developers.sun.com/appserver/reference/techart/ws_mgmt.html
It is a crisply written tutorial on creating a simple Java class and deploy the class as a JAX-WS 2.0 Web service.
Requires -
a) Sun Application Server - I got App Server Platform Edition 9.0_01
b) Also requires Java_Home to JDK 1.5.0 - this was something i did even though my App Server i believe is using jdk 1.6.
[The reason i know that is because when i removed jdk 1.6. directory from my C:\Java location, my app server asadmin commands would not be found. While i dont remember configuring the App Server to point to JDK 1.6. specifically, i am assuming the app server version i downloaded and installed auto installs it and uses it]
I wrote up the class as described in the tutorial.
Initially i had difficulty compiling the class, and it would error out as being unable to find the javax.jws package.
I researched the problem a little and included the jaxws-tools.jar in the classpath and that error went away.
According to the tutorial the presence of the @WebService annotation will tell the App Server to process it as such and also auto deploy it to the App Server.
However while the class file is created, the autodeploy part fails completely.
I have the entries in server.log corresponding to this javac execution stored in a separate file. Didnt know how best to attach it here.
Please help.
Best regards,Just inline the appropriate pieces of the server log.
-
Is it possible to create web services for classes and bol objects?
i am new to crm web channel,can any one please ,help me....
thank u in advance,
kiran.Hi Kiran,
Here, when you are talking about classes and BOL objects together, I assume you are talking about the BOL layer for CRM. If that is the case, and you have no dependency on WCEM for these objects, I would suggest you use the NW gateway to expose Odata web services from the CRM box itself. If you would like to expose the Odata web services from WCEM, please have a look at Ch 7 Dev & Extension Guide available in help.sap.com/wec301.
Good luck!
Regards
Pranshu -
Calling Web Service Proxy with Custom java Object as parameter
I created a web service proxy from WSDL URL using JDeveloper 11g(.5 version)
I need to call a webservice method which takes custom Java Object( Ex: ABC.java) as Input parameter. It creates the XSD java (ABC.java) file for that.
@XmlElementRef(name = "abc", namespace = "http://impl.service.ns.test", type = JAXBElement.class)
protected JAXBElement<ABC> abc;
ABC.java has a property of type java.util.Set of a custom Java Object (Set<XYZ.class>)
It doesn't create xsd file for XYZ.java.
@XmlElementRef(name = "XYZ", namespace = "http://model.ns.test/xsd", type = JAXBElement.class)
protected JAXBElement<Set> xyz;
Please help me.The passing of Java objects in and out of a web service is NOT supported. variables must be xml documents defined by a XML schema. In my opinion, missing Java object and WSDL is not a good idea. -Edwin
-
Import jax-ws web service created in netbeans 6.5
Hello,
I have seen a few posts on this but without a result, so trying again in case there has been some progress. First of all I ran the UsWeather example, imported the webservices etc. and this works. I then tried the same for my web service, jax-ws create via netbeans and this doesn't work. It is a simple calc function that should accept two integer, i and j and return the sum. From what I can make out it is because the parameters are somehow wrapped and are not visible via the creates action scripts
So when I run this sort of thing:
private var calc:CalcWSService = new CalcWSService;
var req:Add_request = new Add_request();
req.i = 2;
req.j = 3;
calc.add_request_var = req;
// Invoke the method
calc.add_send();
I get the error message
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Test/getMyCalc2()[Y:\FlexWorkspaces\TestWorkSpace\Test\src\Test.mxml:64]
at Test/___Test_Button4_click()[Y:\FlexWorkspaces\TestWorkSpace\Test\src\Test.mxml:92]
If I reference my web service as follows
<mx:WebService id="webService" wsdl="http://localhost:8080/CalcWSProject/CalcWSService?wsdl" >
<mx:operation name="add" resultFormat="object" result="display(event);">
<mx:request xmlns="" >
<i>2</i>
<j>4</j>
</mx:request>
</mx:operation>
</mx:WebService>
and run
webService.add.send();
then it works
The generated CalcWSService.as add function looks like this(i.e.the parameters appear to be hidden
public function add(add:Add):AsyncToken
var _internal_token:AsyncToken = _baseService.add(add);
_internal_token.addEventListener("result",_add_populate_results);
_internal_token.addEventListener("fault",throwFault);
return _internal_token;
Any way to get around the problem when importing the web services via the wizard?Result after navigating to: http://localhost:8084/HelloWS/HelloWS?xsd=1
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://hi.me.org/" version="1.0">
<xs:element xmlns:ns1="http://hi.me.org/" type="ns1:add" name="add"/>
<xs:complexType name="add">
<xs:sequence>
<xs:element type="xs:int" minOccurs="0" name="arg0"/>
<xs:element type="xs:int" minOccurs="0" name="arg1"/>
</xs:sequence>
</xs:complexType>
<xs:element xmlns:ns2="http://hi.me.org/" type="ns2:addResponse" name="addResponse"/>
<xs:complexType name="addResponse">
<xs:sequence>
<xs:element type="xs:int" minOccurs="0" name="return"/>
</xs:sequence>
</xs:complexType>
</xs:schema> -
Service Interface for the Business Objects
Hello everyone. I'm developing a Web Service using the service interface that provide JDeveloper for their Business Objects. I have a relationship between two EO as described below:
EntityA 1 ...... * EntityB and it is a composition relation.
Each ID in the entities are sequencial. There is no problem for create EntityA and EntityB at the same time. My probelm is that if I want to create only EntityB. I can't use the default method provided by the AppModule, neither make a custom method like:
public boolean createEntityB(EntityBRowImpl mayEntityB){
//Sample code.
}because always a new row is created, and as EntiyB is a child of EntiyA, require the father's id and of curse an error ocurr. Also, can't let someone write the ID in the foreing key of the EntiyB.
How can I solve this please?
Thanks in advance. Any suggestions are very wellcome.
PS: I'm using JDeveloper 11.1.1.5The error you're hitting is presumably JBO-25030.
Look to the "merge" command. In the parent you specify just the key of the preexisting parent record, and then in the child you specify your new child record.
CM. -
Multiple web services on single server causing object undefined errors
Hi,
I've currently got a bit of a strange problem within a web service that is proving difficult to debug.
There are the web service urls :
api.domain.com -> /var/www/html/api.domain.com/ -> CF mapping to MYSERVICE
testapi.domain.com -> /var/www/html/testapi.domain.com/ -> CF mapping to MYSERVICE_test
In both instances the cfcs that contain the code to be translated into a WSDL reside in /api/..., in the case of this example, /api/common.cfc. wsargs constists simply of refreshwsdl true.
If I call the following 2 lines ...
obj_myservice = CreateObject('webservice','http://api.domain.com/api/common.cfc?wsdl',wsargs);
obj_myservice_test = CreateObject('webservice','http://testapi.domain.com/api/common.cfc?wsdl',wsargs);
I then call the same method in both, and they are successful. When checking the "Data & Services" -> "Web Services" panel within the CF control panel, only the web service "http://api.domain.com/api/common.cfc?wsdl" is listed, and not testapi.domain.com......
If I reverse the order in which the WSDL's are loaded then this switches, and testapi.domain.com..... gets listed under "Web Services" but api.domain.com..... does not. In essence it appears as though for some reason the CF server overwrites one with the other. The exact "object undefined" error is proving difficult to reproduce reliably.
This appears to happen no matter which server is accessing the web service, be it the same server or a remote server. All servers involved are running CF8. Accessing the 2 WSDL files in a browser results in the 2 WSDLs being rendered correctly with different namespace values.
On the same server are 2 more services
MYSERVICE2
MYSERVICE2_test
These reside in the /api2 directories on the same 2 subdomains, api. and testapi. MYSERVICE2 and MYSERVICE2_test appear to conflict with each other. MYSERVICE and MYSERVICE_test appear to conflict with each other. MYSERVICE and MYSERVICE2 do not appear to conflict with each other.
Is there a configuration change or anything like that which I should be aware of that would prevent me doing the above? The 2 /api/ directories are nearly identical with the exception that the namespace and complex type names have been set to http://api.domain.com & MYSERVICE in the first, and http://testapi.domain.com & MYSERVICE_test in the second url.
I have also tried mapping /MYSERVICE and /MYSERVICE_test within /opt/coldfusion8/WEB-INF/jrun-web.xml to no avail.
Any help would be appreciated. If there is any useful information that I have missed off please let me know and I'll dig it out.
- Simon HHi,
As an extension to the above
Server Test service "Live" service
1 ("dev") devtest devlive http://dev(test/live).domain.com
2 ("test") testtest testlive http://test(test/live).domain.com
I currently have a test script (TEST1) that performs the following :
CreateObject + call method from devlive
CreateObject + call method from devtest
CreateObject + call method from testtest
The script errors on the third, when it attempts to call a method from devtest. On the server on which this test script is running, by the end of this, there are the following 2 web services in the Coldfusion control panel :
http://devlive.domain.com/api/common.cfc?wsdl
http://testtest.domain.com/api/common.cfc?wsdl
I have a second test script (TEST2) on a second server distinctfrom the first test script server, on which the following is performed :
CreateObject + call method from testlive
If I execute TEST2, then it executes fine. If I execute TEST1 straight after, then I receive the following error on TEST1
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXException: Deserializing parameter 'objectFetchReturn': could not find deserializer for type {http://common.types.WEBSERVICE_test}details
Where WEBSERVICE.types.common.details is a complex type (/api/types/common/details.cfc). If I then run the TEST2 script again straight after, the same error appears (with WEBSERVICE in place of WEBSERVICE_test). If I execute TEST2 twice in a row, or TEST1 twice in a row, then the error disappears"test" server has got jrun-web.xml edited to include the following, which "dev" does not.
<virtual-mapping>
<resource-path>/WEBSERVICE_test</resource-path>
<system-path>/var/www/html/testapi.domain.com/api</system-path>
</virtual-mapping>
<virtual-mapping>
<resource-path>/WEBSERVICE</resource-path>
<system-path>/var/www/html/api.domain.com/api</system-path>
</virtual-mapping>
I hope that this extended explaination helps.
Simon H -
How to expose sort attributes in a web service created on a AM 11g TP4
I'm using Jdeveloper 11g TP4 to create a web service on the application module.
When I run the web service, it is working fine. Can someone tell me how to expose the sort attributes for the user to choose?
How do I expose the sort Order for the user to select?
These are the steps I followed:
1) Created a new application.
2) Created a view object in the Model project.
Created one bind variable.
Created new view Criteria and used the bind variable.
3) Created a new jspx page.
From the Data control dragged and dropped the Named Criteria on to the page and used "ADF Query Panel with Table..."
4) Ran the Jspx page. It works fine.
Double Click Application Module.
Click on tab Service Interface.
Hit New, this will open the Wizard to Create a new Service Interface.
Followed instructions and selected all the applicable methods to expose as web service.
At the end of the process, wsdl, xsd, java files are created.
I'm able to run this web service.
The field to query the data is exposed in the Web Service.
Is there a way to expose the sorting attributes to be selected by the user? i.e. I want to expose the fields to the user.
Thanks,
Jagadish.Why bother with TP 4? JDev 11g is already production.
--olaf
Maybe you are looking for
-
We wish to GO Live on a particular date. However the opening balance before that particular date are still under verification, but still we are having values of opening balances will be corrected say in next 20 to 25 days after the date of go live. P
-
Why won't my iPhone charge?
This has been a problem for the past day or two... I was facetiming someone and when I put it on charge it would charge and a few minutes later it won't. Before I went bed, it took well over 8 hours or so for it to charge, normally it takes like two.
-
i am having problem burning a dvd in my HP pavilion dv6 2001au laptop. it used to burn dvds before but now there is an error message saying "burning failed" it strats to burn the dvd but when it reaches say 80- 90% nothing happens and ": burning fai
-
How to put current date in File name while saving PDF file.
Hi expert, A report is scheduled for broadcasting in PDF format . User wants it should have current date in its file name. Now system generated file name is Z_XXX_YYY_0000.pdf , but it should have Z_XXX_YYY_10012012.pdf or in any date format. Regard
-
Children swf timeline code vs document class.
Hey all, I am loading a swf into another and had a question that I can't seem to find an answer to. I am trying to find out why when I place trace(parent); in the timeline of my child swf I get [object Loader] but if i place trace(parent); in the co