Web Services Parameters that are Arrays
I am evaluating HTML DB to see if it would be possible to create a simple application that calls a web service.
The web service was generated using JDeveloper and wraps up a PL/SQL function that takes an object type with several fields as an input parameter and a table of object types as the output parameter.
The Web service therefore has an input parameter that is an single object containing several input fields and an output parameter that is an array of objects containing several result fields.
The HTML DB 'test web service' or 'Create a form from a Web Service' does not recognise these input or output parameters, although the 'Web Service Reference' does list all the input and output parameters.
I am assumming that there is a coding solution when using these kind of parameters but I cannot find any obvious guidence for this.
Can anyone help or point me in the right direction?
Thanks
I have this same problem...
Is it a bug?
It's strange because other web services work fine
is it because we are using the wrong format or version wsdl?
anyone have any ideas?
Similar Messages
-
How to retrieve web service results that are stored in an array?
Hi, everyone,
I am using a manually created web service reference in APEX3.0.1 to call an external web service for a simple company search. Here is the WSDL:
http://ws.strikeiron.com/DnBBusinessProspectLinkage2?WSDL
The web referene is tested fine. And here is a sample test result:
<?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">
<Header xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<SubscriptionInfo xmlns="http://ws.strikeiron.com">
<LicenseStatusCode>0</LicenseStatusCode>
<LicenseStatus>Valid license key</LicenseStatus>
<LicenseActionCode>7</LicenseActionCode>
<LicenseAction>No hit deduction for invocation</LicenseAction>
<RemainingHits>4921</RemainingHits>
<Amount>0</Amount>
</SubscriptionInfo>
</Header>
<soap:Body>
<CompanySearchResponse xmlns="http://www.strikeiron.com">
<CompanySearchResult>
<ServiceStatus>
<StatusNbr>213</StatusNbr>
<StatusDescription>Successful search</StatusDescription>
</ServiceStatus>
<ServiceResult>
<Count>2</Count>
<CandidateCompanies>
<CandidateCompany>
<CompanyName>MSC SOFTWARE CORPORATION</CompanyName>
<StreetAddress>2 MACARTHUR PL</StreetAddress>
<City>SANTA ANA</City>
<State>CA</State>
<PostalCode>927075924</PostalCode>
<Phone>7145408900</Phone>
<CountryCode>US</CountryCode>
<BranchIndicator>Headquarters</BranchIndicator>
<TradingName />
<ConfidenceCode>8</ConfidenceCode>
<MatchGrade>BAAAAZZ</MatchGrade>
<MatchNameGrade>Similar</MatchNameGrade>
<MatchNamePercent>62</MatchNamePercent>
<MatchStreetNumberGrade>Same</MatchStreetNumberGrade>
<MatchStreetNumberPercent>100</MatchStreetNumberPercent>
<MatchStreetNameGrade>Same</MatchStreetNameGrade>
<MatchStreetNamePercent>100</MatchStreetNamePercent>
<MatchCityGrade>Same</MatchCityGrade>
<MatchCityPercent>100</MatchCityPercent>
<MatchCountryStateGrade>Same</MatchCountryStateGrade>
<MatchCountryStatePercent>100</MatchCountryStatePercent>
<MatchPOBoxGrade>Not provided</MatchPOBoxGrade>
<MatchPOBoxPercent>-1</MatchPOBoxPercent>
<MatchPhoneGrade>Not provided</MatchPhoneGrade>
<MatchPhonePercent>-1</MatchPhonePercent>
</CandidateCompany>
<CandidateCompany>
<CompanyName>TYRA TECHNOLOGIES, INC</CompanyName>
<StreetAddress>2 MACARTHUR PL</StreetAddress>
<City>SANTA ANA</City>
<State>CA</State>
<PostalCode>927075924</PostalCode>
<Phone>7145408900</Phone>
<CountryCode>US</CountryCode>
<BranchIndicator>Headquarters</BranchIndicator>
<TradingName />
<ConfidenceCode>8</ConfidenceCode>
<MatchGrade>BAAAAZZ</MatchGrade>
<MatchNameGrade>Similar</MatchNameGrade>
<MatchNamePercent>62</MatchNamePercent>
<MatchStreetNumberGrade>Same</MatchStreetNumberGrade>
<MatchStreetNumberPercent>100</MatchStreetNumberPercent>
<MatchStreetNameGrade>Same</MatchStreetNameGrade>
<MatchStreetNamePercent>100</MatchStreetNamePercent>
<MatchCityGrade>Same</MatchCityGrade>
<MatchCityPercent>100</MatchCityPercent>
<MatchCountryStateGrade>Same</MatchCountryStateGrade>
<MatchCountryStatePercent>100</MatchCountryStatePercent>
<MatchPOBoxGrade>Not provided</MatchPOBoxGrade>
<MatchPOBoxPercent>-1</MatchPOBoxPercent>
<MatchPhoneGrade>Not provided</MatchPhoneGrade>
<MatchPhonePercent>-1</MatchPhonePercent>
</CandidateCompany>
</CandidateCompanies>
</ServiceResult>
</CompanySearchResult>
</CompanySearchResponse>
</soap:Body>
</soap:Envelope>
Here is my xpath defined in the report:
/CompanySearchResponse/CompanySearchResult/ServiceResult/CandidateCompanies
According to the WSDL file, the candidate companies are stored in an array. I am having problem to retrieve this values from the array. The web service ref is called but it returns nothing.
Anyone in the forum can tell me what I did wrong?
Thanks in advance!
JeffHi, did you manage to figure this out? I'm having a similar problem with arrays.
Also, i'm looking at how I can pass an array of values as input to the webservice call.. eg if I were calling a stock ticker service that allows you to supply a list of tickers as input so that you can get all your responses in one call. Anyone any thoughts on that?
Cheers,
Paul. -
Web Service Method that returns an ArrayList
Hi guys,
I have to create a web service method that returns an ArrayList, but it's not working. My problem is:
With the "@XmlSeeAlso" annotation, my client prints the result, but the ArryaList is not from java.util, it's from org.me.calculator so I can't use it.
If I remove this annotation, I get no result, with this error message on Tomcat 6:
[javax.xml.bind.JAXBException: class java.util.ArrayList nor any of its super class is known to this context.]
I'm a newbie, and trying to understand web services (I read some posts here, but didn't get the point, from its answers), but this problem I just can't figure out how to solve....
WEb Service
package org.me.calculator;
import java.io.Serializable;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import java.util.*;
import java.util.ArrayList;
import javax.xml.bind.annotation.XmlSeeAlso;
* @author eduardo.domanski
@WebService()
@XmlSeeAlso({java.util.ArrayList.class}) // With this, I can see the result on client, but, the ArrayList is an org.me.calculator.ArrayList class.... Strange...
public class CalculatorWS {
@WebMethod(operationName = "valores")
public ArrayList valores(@WebParam(name = "a") int a,
@WebParam(name = "b") int b) {
ArrayList teste = new ArrayList();
ArrayList a1 = new ArrayList();
a1.add(a);
a1.add(b);
ArrayList a2 = new ArrayList();
a2.add(a+b);
a2.add(a-b);
teste.add(a1);
teste.add(a2);
return teste;
}CLient
package org.me.calculator.client;
import java.io.*;
import java.net.*;
import java.util.ArrayList;
import javax.servlet.*;
import javax.servlet.http.*;
public class ClientServlet extends HttpServlet {
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet ClientServlet</title>");
out.println("</head>");
out.println("<body>");
out.println("<h1>Servlet ClientServlet at " + request.getContextPath() + "</h1>");
try { // Call Web Service Operation
org.me.calculator.CalculatorWSService service = new org.me.calculator.CalculatorWSService();
org.me.calculator.CalculatorWS port = service.getCalculatorWSPort();
// TODO initialize WS operation arguments here
int i = 8;
int j = -6;
// TODO process result here
ArrayList result = (ArrayList) port.valores(i, j);
out.println("Result = " + result);
} catch (Exception ex) {
System.out.println(ex);
// TODO handle custom exceptions here
out.println("</body>");
out.println("</html>");
out.close();
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}THank you all,
Eduardo
Edited by: EduardoDomanski on Apr 23, 2008 4:40 AMI forgot to say that, when I try to return an ArrayList of an object, for example, ClassA, which is on the package org.me.classes, on my Server App, the ArrayList is returned, but the objects are from type org.me.calculator.ClassA. It should be from org.me.classes.ClassA, right?
This package also exists on my client App, to use the object, but as the returned type is from another package, I can't even cast it. I tried some annotations @Xml... but it failed.
Packages
ServerApp
org.me.calculator
CalcWS.java
org.me.classes
ClassA.java
Client App
org.me.classes
ClassA.java
The return from my method should be an ArrayList of org.me.classes.ClassA, but when I print it, on client, it's from org.me.calculator.ClassA.
Does anybody knows, or had the same problem?
Thanks,
Eduardo -
Parameters that are given in the service
Hello All,
While creating a service we give parameters like genertaeddynpro,transaction etc.I want to know what all parameters are available and what is the functionlaity of each of these?
Thanks,
Rakesh.Hi Rakesh,
The help.sap.com has information on ITS parameters for the Integrated ITS
goto:
http://help.sap.com/saphelp_nw04/helpdata/en/4f/2e6a52c3cdc44d83169b181a9c62ba/frameset.htm
--> Configuration
also please review the WIKI:
https://wiki.sdn.sap.com/wiki/x/i50
which has useful information on both parameters that you mention
Regards,
Oisí -
Web Service Task - that accepts XmlNode Input
I'm creating an SSIS package that uses a web service method called "GetReportResults" ). The input parameters are:
username (string)
password (string)
reportid (int)
templateValues (xmlnode)
When I run the package, how do I input the values for the xmlnode? The web service documentation shows an example that says I need to pass in the templateValues (filters) like this for the xmlnode:
<FilterItems>
<FilterItem FilterItemId="62898" FieldTitle="Date Modified" Operator="GreaterThan" Value="" IsTemplate="true" />
<FilterItem FilterItemId="62899" FieldTitle="Date Modified" Operator="LessThan" Value="" IsTemplate="true" />
<FilterItem FilterItemId="62900" FieldTitle="Date Modified" Operator="GreaterThanOrEqualTo" Value="8/13/2013 12:00 AM" IsTemplate="false" />
<FilterItem FilterItemId="62901" FieldTitle="Status" Operator="DoesNotContain" Value="" IsTemplate="true" />
</FilterItems>
How do I go about setting this up so that when the package runs the templateValues are automatically input? Is there some sort of XML task that will accomplish this? If so, how would I implement this.I did find find this in the web service documentation:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0.0">
<xs:element name="FilterItems">
<xs:complexType>
<xs:sequence>
<xs:element name="FilterItem" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<!-- Set the inner text to the appropriate value -->
<xs:simpleContent id="Value">
<xs:extension base="xs:string">
<!--
You must use either the FilterItemId or the FieldTitle
-->
<xs:attribute name="FilterItemId" type="xs:integer" use="optional"/>
<xs:attribute name="FieldTitle" type="xs:string" use="optional"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema> -
Access web service from tool area
Hi,
I want to edit the tool Area iView to invoke an external web services.
I created a tool Area iView to be customized by importing com.sap.portal.navigation.toolarea.par.bak file from the NW2004s and create new portal project.
I know how to edit add or remove any part from the tool area iview
But how I can access the web service proxy? or what is the best way to implement that.Stumbled into a small problem:
I have this method in my web service:
@WebMethod(operationName = "test")
public Integer test(@WebParam(name = "number")
int number) {
return number;
}My client looks like this
public static void main(String[] args) {
try {
String BODY_NAMESPACE_VALUE = /*namespace url*/;
QName port = new QName(/*Service name*/);
ServiceFactory factory = ServiceFactory.newInstance();
Service service = factory.createService(new QName(/*Service name*/));
Call call = service.createCall(port);
call.setTargetEndpointAddress(/*WSDL location*/);
call.setReturnType(XMLType.XSD_INT);
call.setOperationName(new QName(BODY_NAMESPACE_VALUE, "test"));
call.addParameter("number", XMLType.XSD_INT, ParameterMode.IN);
Integer[] i = new Integer[1];
i[0] = new Integer(20);
System.out.println("test :"+call.invoke(i));
} catch (Exception ex) {
ex.printStackTrace();
} I get return values ok from the web service in my java client since I tried getting a constant from the web service. However, in the case above I am trying to send 20 from the client to the web service and receive it back. However I am receiving 0. Does anyone know why sending parameters from client to web service is not working?
Thanks and regards,
Krt_Malta -
Exposing a report as RESTful web service - Parameters
Hi,
I am creating a RESTful web service by exposing an apex report. It just works fine and it renders the data. However I want to have parameters and values in the web service URL so that the data can be filtered based on the parameter values?
For example:
http://127.0.0.1:8080/apex/apex_rest.getReport?app=100&page=15&reportid=rest_example renders correctly for the report query
select * from (
select
"CUSTOMER_ID",
"CUST_FIRST_NAME",
"CUST_LAST_NAME",
"CUST_STREET_ADDRESS1",
"CUST_STREET_ADDRESS2",
"CUST_CITY",
"CUST_STATE",
"CUST_POSTAL_CODE",
"PHONE_NUMBER1",
"PHONE_NUMBER2",
"CREDIT_LIMIT",
"CUST_EMAIL"
from #OWNER#.DEMO_CUSTOMERS )
where (
instr(upper("CUST_FIRST_NAME"),upper(nvl(:P15_REPORT_SEARCH,"CUST_FIRST_NAME"))) > 0 or
instr(upper("CUST_LAST_NAME"),upper(nvl(:P15_REPORT_SEARCH,"CUST_LAST_NAME"))) > 0
)But I want to filter the result for a particular customer id by getting a value in the URL like this.
http://127.0.0.1:8080/apex/apex_rest.getReport?app=100&page=15&reportid=rest_example&P15_CUSTOMER_ID=6 and to use the value received thro the URL in the report query
select * from (
select
"CUSTOMER_ID",
"CUST_FIRST_NAME",
"CUST_LAST_NAME",
"CUST_STREET_ADDRESS1",
"CUST_STREET_ADDRESS2",
"CUST_CITY",
"CUST_STATE",
"CUST_POSTAL_CODE",
"PHONE_NUMBER1",
"PHONE_NUMBER2",
"CREDIT_LIMIT",
"CUST_EMAIL"
from #OWNER#.DEMO_CUSTOMERS
where customer_id = :P15_CUSTOMER_ID)
where (
instr(upper("CUST_FIRST_NAME"),upper(nvl(:P15_REPORT_SEARCH,"CUST_FIRST_NAME"))) > 0 or
instr(upper("CUST_LAST_NAME"),upper(nvl(:P15_REPORT_SEARCH,"CUST_LAST_NAME"))) > 0
)Is it possible to have it working in this way?
I am currently testing this in apex 4.2 and Oracle 11g XE. My development environment will be Apex 4.1 and Oracle 11g.
Thanks in Advance.
Regards,
Natarajan
Edited by: Nattu on Dec 18, 2012 2:09 AMIt does accept values for the parameters but does not accept value names in the URL.
The previous thread Restful web service passing character parameters helped me to get it working.
Thanks. -
Web Service Parameters Reversed
I'm trying to run an FMIS aplicattion which calls an web service method with 2 parameters, but an error always occurs.
We detected that error is caused because FMIS reverses the parameter order when calling that method.
Look the following example from a call to "getMember(nick, token)" got from administration console:
getMember(modelo1,07f69efc85a14e678d532e619dd3908e)
param:token modelo1
param:nick 07f69efc85a14e678d532e619dd3908e
param:parameters undefined
I have made lots of testing in a local FMIS and never such trouble but this is happening from any method called from FMIS hosted at INFLUXIS. Does anybody have a hint on how to fix it?
Thanks,Cristian,
Please post the question in relevant forum
Thanks
Bala Duvvuri -
Which Web Service message formats are supported?
Hi,
From the documentation it looks like only SOAP binding 1.1 is supported but nothing is mentioned about the supported message formats, e.g. Document literal (wrapped/bare), rpc-encoded, rpc-literal. etc. Does anybody know which are supported?
Regards PeteHi,
I opened a SR on Metalink and got this answer:
ApEx supports only RPC/literal style. The current support for Web services was designed to work with RPC style Web services nearly three years ago. We (
ApEx development/product management) are reviewing enhancement to more broadly support Web services and hope to have that support in a future release.
For the current support of Web services in Oracle Application Express, a design decision was made to support only WSDL’s that use the W3C XML Schema specification as it
is data type system. Just converting a Web service to RPC style is not all that is required to make it work properly with Application Express. It also must use the XML Schema specification as its data type system and prefix those type references, with the same prefix as the XML Schema reference in the definitions declaration in the WSDL.
Oracle Application Express expects type declarations to be fully qualified with the same prefix of the reference to the XML Schema specification as in the WSDL’s definitions declaration (http://www.w3.org/2001/XMLSchema). If the WSDL contains type references that are not qualified with the prefix of the XML Schema specification, then editing the WSDL to include these type references with the corresponding prefix will allow Oracle Application Express to properly parse the WSDL.
Support for more loosely defined types is planned for a future release of Oracle Application Express.
Regards Pete -
it appears that WSI compliant web services all pass a single parameter, which is an object representing all the parameters. is this correct?
This is correct only for document literal style web services, as in these you can only have a single child element to a SoapBody element.
-
RFC works but web service for that RFC does not work..weird??
hi all,
I created an RFC enabled function module to create a Sales Order in SAP CRM for both for Varinat Configurable and Normal Materials.
The RFC Works well...if i test it..it creates an order and if i go and check the sales order in CRM GUI. i find that sales order is perfect with the configuration data for the configurable items..
Now i created a Web service for this RFC by calling the Web service creation wizard.
Now i am testing the Web service in SOAMANGER T-code and the sales order is created and weird thing the configuration data is missing for Varinat configurable item..
But i dont encounter this problem if i am testing the RFC directly
What could be wrong...why is my web service behaving weird?
I am dying to find this out..did any body enocunter this situation befor ..please helpSure Oliver..
I put a break point using external debugger and when i was testing the Web service in SOAMANAGER..
i could then land into ABAP debugger.
There in my RFC i put a logic such that i diffenetiate between VC and Non-VC items and fill the Charateristic Values only if it is aVC item.
I saw that the IF condition was not executing as they suddenly changed the material structure in ECC and it reflected in CRM.
SO i am inputting 18 digits of material no like '000000000000000001' for '1'...but the if condition was checking against 1 =1 so that loop never executed and chara values are not getting filled.
But if i test RFC in se37 ..it works as i am inputting 1...
Since Web service works with XML (WSDL) need to be very careful with the format in which data is inputted and the format in which the logic we wrote in RFC works.
Once again ..thanks to all people who helped me with the answers...
Regards,
Jessica Sam -
Can any one provide an web service technique that supports http post...?
hi,
i'm working with servlets. i need a webservice technique that supports http-post.
is it possible to work http-post using servlet & axis2 webservice....?hi, if you are about to use axis2, consider trying JAXWS since its very fast to startup, it will then take care of everything what is beyond your business objects (so transforming in into XML etc) moreover, you're going to use web services, thus you ll be working with SOAP, which will wrap your business representation...
here a sample for a time -service. The Date object will automatically be trasinformed into appropriate xsd type by the axis2 engine
@WebService
public class Clock {
public Date getCurrentTime(){
return new Date();
} -
How to create a view for all Service Requests that are not approved by reviewer
Hallo,
I want to create a view in the Service Requests library that shows all SRs that are not approved. How to configure condition that says: if a SR has related Review Activity which is In Progress, show that SRs?
I couldn't find this when creating the view. Thank you.So here's the first problem with that: Which review activity? a SR can contain multiple RAs, so how do we decide if an arbitrary SR is approved or not?
As to the specific language you use (Any child RA is In Progress) you might want to look at the criteria from the default Change approval view, which does something similar:
<QueryCriteria Adapter="omsdk://Adapters/Criteria" xmlns="http://tempuri.org/Criteria.xsd">
<Criteria>
<FreeformCriteria>
<Freeform>
<Criteria xmlns="http://Microsoft.EnterpriseManagement.Core.Criteria/">
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpressionLeft>
<Property>$Context/Path[Relationship='CoreActivity!System.WorkItemContainsActivity' TypeConstraint='CoreActivity!System.WorkItem.Activity.ReviewActivity']/Property[Type='CoreActivity!System.WorkItem.Activity']/Status$</Property>
</ValueExpressionLeft>
<Operator>Equal</Operator>
<ValueExpressionRight>
<Value>$MPElement[Name="CoreActivity!ActivityStatusEnum.Active"]$</Value>
</ValueExpressionRight>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpressionLeft>
<Property>$Context/Property[Type='CoreChange!System.WorkItem.ChangeRequest']/Status$</Property>
</ValueExpressionLeft>
<Operator>Equal</Operator>
<ValueExpressionRight>
<Value>$MPElement[Name="CoreChange!ChangeStatusEnum.InProgress"]$</Value>
</ValueExpressionRight>
</SimpleExpression>
</Expression>
</And>
</Expression>
</Criteria>
</Freeform>
</FreeformCriteria>
</Criteria>
</QueryCriteria>
This is a simple AND criteria with two componets. one looking for a Review Activity (TypeConstraint='CoreActivity!System.WorkItem.Activity.ReviewActivity') which is related to the targetting CR by Contains Activity ($Context/Path[Relationship='CoreActivity!System.WorkItemContainsActivity';
Context in this... context means the CR targeted by the view) where it's status (/Property[Type='CoreActivity!System.WorkItem.Activity']/Status$) is In Progress ($MPElement[Name="CoreActivity!ActivityStatusEnum.Active"]$). The other is filtering
for the target change request's status ( $Context/Property[Type='CoreChange!System.WorkItem.ChangeRequest']/Status$) is In Progress ($MPElement[Name="CoreChange!ChangeStatusEnum.InProgress"]$).
You could convert the second criteria to point to SRs and SR status values, and then use the similar text for the first criteria. i'd recommend
Anton's Advanced View Editor (or
the free version) to do the criteria adjustment. -
Report to show Service Requests that are open on a day selected by the user
Dunno if I'm being thick, but I can't see how to do this in a report/dashboard...
The user selects a day and the report pulls back all the Service Requests that were open on that day using the following logic...
Service Request Opened Date <= Selected date & Service Request Closed Date >= Selected date
Is this possible?You can do this with a report or a dashboard.
For a report, create a report your subject ares, like Service Request. In Step 3, Create a prompt on your date and choose Column Filter Prompt. Give the prompt a caption ("Enter/Choose Date" for example). Choose the date field for the Filter on Column. Determine how you want the users to select the value and hit OK. My experience has been that you need to let users type in the date, as opposed to choosing from a drop-down list, because of the volume of data and performance reasons, but test it to determine what works best for your needs.
For a dashboard, you would need to create a dashboard prompt for your dashboard report. You do this by creating a new report on your intended subject area, i.e. Service Request. Instead of creating the report as you normally do, you need to click on the Create Dashboard Prompt button at the top left, just below the Oracle logo. Choose the right reporting area, then complete the prompt details. Don't forget to allow for the prompt in your report.
I always recommend that you consider purchasing a great book on reporting, written by Mike Lairson. It is an excellent resource for nearly all of your reporting questions. You can find it on amazon.com.
http://www.amazon.com/Oracle-Demand-Reporting-Osborne-ORACLE/dp/0071593047/ref=sr_1_1?ie=UTF8&s=books&qid=1274893170&sr=8-1
Good Luck,
Thom -
An error when testing a web service control that takes a complexType argument
i took some wsdl file and generated a web service control in BEA Workshop 8.1.
from the jcx file, i generated the jws test file.
now, the webservice takes in a complex argument as an input. as a result, i added
specialized code in the jws test file to construct the complex type to pass into
the web service control. it compiled/built fine. but when i do the actual testing,
i get the following error:
java.lang.NullPointerException
at com.bea.xml.marshal.AtomicValueMPlan.marshal(AtomicValueMPlan.java:90)
at com.bea.xml.marshal.BaseMPlan.marshal(BaseMPlan.java:337)
at com.bea.xml.marshal.MarshalContext.writeElementObjectOrHref(MarshalContext.java:426)
at com.bea.xml.marshal.BaseMPlan.writeValueUsingStrategy(BaseMPlan.java:307)
at com.bea.xml.marshal.BaseMPlan.marshal(BaseMPlan.java:349)
at com.bea.xml.marshal.MarshalContext.writeElementObjectOrHref(MarshalContext.java:426)
at com.bea.xml.marshal.BaseMPlan.writeValueUsingStrategy(BaseMPlan.java:307)
at com.bea.xml.marshal.BaseMPlan.marshal(BaseMPlan.java:349)
at com.bea.xml.marshal.MethodMPlan.marshal(MethodMPlan.java:260)
at com.bea.wlw.runtime.core.dispatcher.DispMessage.marshalXml(DispMessage.java:386)
at com.bea.wlw.runtime.jws.call.SoapCall.<init>(SoapCall.java:150)
at com.bea.wlw.runtime.jws.call.SoapHttpCall.<init>(SoapHttpCall.java:61)
at com.bea.wlw.runtime.core.control.ServiceControlImpl.invoke(ServiceControlImpl.jcs:559)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java:359)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:420)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:393)
at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(JcsProxy.java:387)
at $Proxy8.DocLitQueryByExample(Unknown Source)
at doc_lit_bs.bs_doc_litControlTest.DocLitQueryByExample(bs_doc_litControlTest.jws:31)
i checked the line of code in the jws file and it looks like this:
public doc_lit_bs.bs_doc_litControl.ListOfSampleAccount DocLitQueryByExample(java.lang.String
AccountName)
doc_lit_bs.bs_doc_litControl.ListOfSampleAccount response;
doc_lit_bs.bs_doc_litControl.ListOfSampleAccount ListOfSampleAccount =
new doc_lit_bs.bs_doc_litControl.ListOfSampleAccount();
doc_lit_bs.bs_doc_litControl.Account account = new doc_lit_bs.bs_doc_litControl.Account
account.Name = AccountName;
ListOfSampleAccount.Account = account;
response = bs_doc_litControl.DocLitQueryByExample (ListOfSampleAccount);
/* line 31 */
return (response);
what could be the problem? and how may i resolve this? any help is greatly appreciated.Hello,
There was an NPE problem reported and resolved (CR117566) concerning
using "mixed" ComplexType, something like:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<xs:complexType name="fooType" mixed="true"/>
<xs:element name="root" type="fooType"/>
</xs:schema>
Generally speaking, an NPE will be a bug. Can you provide an small
example that generated the NPE to the support team, it would be very
helpful in resolving this issue.
Thanks,
Bruce
Bolei wrote:
>
i took some wsdl file and generated a web service control in BEA Workshop 8.1.
from the jcx file, i generated the jws test file.
now, the webservice takes in a complex argument as an input. as a result, i added
specialized code in the jws test file to construct the complex type to pass into
the web service control. it compiled/built fine. but when i do the actual testing,
i get the following error:
java.lang.NullPointerException
at com.bea.xml.marshal.AtomicValueMPlan.marshal(AtomicValueMPlan.java:90)
at com.bea.xml.marshal.BaseMPlan.marshal(BaseMPlan.java:337)
at com.bea.xml.marshal.MarshalContext.writeElementObjectOrHref(MarshalContext.java:426)
at com.bea.xml.marshal.BaseMPlan.writeValueUsingStrategy(BaseMPlan.java:307)
at com.bea.xml.marshal.BaseMPlan.marshal(BaseMPlan.java:349)
at com.bea.xml.marshal.MarshalContext.writeElementObjectOrHref(MarshalContext.java:426)
at com.bea.xml.marshal.BaseMPlan.writeValueUsingStrategy(BaseMPlan.java:307)
at com.bea.xml.marshal.BaseMPlan.marshal(BaseMPlan.java:349)
at com.bea.xml.marshal.MethodMPlan.marshal(MethodMPlan.java:260)
at com.bea.wlw.runtime.core.dispatcher.DispMessage.marshalXml(DispMessage.java:386)
at com.bea.wlw.runtime.jws.call.SoapCall.<init>(SoapCall.java:150)
at com.bea.wlw.runtime.jws.call.SoapHttpCall.<init>(SoapHttpCall.java:61)
at com.bea.wlw.runtime.core.control.ServiceControlImpl.invoke(ServiceControlImpl.jcs:559)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java:359)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:420)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:393)
at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(JcsProxy.java:387)
at $Proxy8.DocLitQueryByExample(Unknown Source)
at doc_lit_bs.bs_doc_litControlTest.DocLitQueryByExample(bs_doc_litControlTest.jws:31)
i checked the line of code in the jws file and it looks like this:
public doc_lit_bs.bs_doc_litControl.ListOfSampleAccount DocLitQueryByExample(java.lang.String
AccountName)
doc_lit_bs.bs_doc_litControl.ListOfSampleAccount response;
doc_lit_bs.bs_doc_litControl.ListOfSampleAccount ListOfSampleAccount =
new doc_lit_bs.bs_doc_litControl.ListOfSampleAccount();
doc_lit_bs.bs_doc_litControl.Account account = new doc_lit_bs.bs_doc_litControl.Account
account.Name = AccountName;
ListOfSampleAccount.Account = account;
response = bs_doc_litControl.DocLitQueryByExample (ListOfSampleAccount);
/* line 31 */
return (response);
what could be the problem? and how may i resolve this? any help is greatly appreciated.
Maybe you are looking for
-
Tabular form condition type value of item / column in expression 1
Hi Question 1 I was wondering if anyone can help with the necessary syntax so that I can set a Condition Type for a column in a Tabular Form. What I'm trying to do is show or hide a column based on the contents of another column in the same row for i
-
I am evaluating Logical standby for an application, but I need to confirm if there is a prerequisite that both source and target databases need to be on the same os platform. My source server is HP UX 11.11 and Target server is HP Itanium ia64 11.31.
-
I have installed Itunes on my pc home (Windows Vista). Then i buy an app, but now i can't install it on on my ipad (with USB). What i have to do? thanks
-
What is the industry standard for body copy text size?
11pt? Using a brochure for an example. I know it depends on the font but if we were going just standard what would the recommendation be? Also include a too small reference as well. Thanks!
-
Column Headings in the REPORT WRITER....
Hi friends, if any body knows about the report writer and worked on that, could you please guide me how to get the column headings of the output in the report writer. Please, its urgent. Thanx and regards, ram.