Error returning large String arrays from web service
Hi,
I currently have an EJB that returns a String[] array that I have implemented as
a Web Service. When I execute a Java client (JSP) from Weblogic, I don't have a problem
as long as the returned array is relatively small, but when the array starts to get
a little larger (say 20 elements, about 30 chars each), I consistently get:
SAXException: java.lang.IllegalArgumentException:array element type mismatch.
Strangely enough, when my web service client is a .asp page running under MS IIS
(using the MS SOAP Toolkit), it works fine. I have returned as many as 15000 - 20000
array elements in one call. And since I am calling the same Weblogic EJB with the
MS client, I know it's a problem with the Java client, not the EJB.
Anybody know of a bug or had this experience before? Or know what I might be doing
wrong? FYI, I am using Weblogic 6.1 SP2.
Thanks,
Steve
Hi Steve,
Sure we're interested...I'll pass this along to the XML folks.
Thanks for the feedback,
Bruce
Steve Alexander wrote:
In case anyone is interested, I solved my problem. I was mis-diagnosing the problem
- thinking it was a size issue when it actually was a data issue. On the calls where
I was returning a large array, some of the array members were null. When I made them
enpty strings "", it worked. Apparently the default SAX parser BEA uses doesn't like
the nulls, whereas the MS parser doesn't care.
"Steve Alexander" <[email protected]> wrote:
Thanks Bruce,
FYI - I have reproduced the problem on WL7.0. I have turned it in to support
as you
suggested.
Steve
Bruce Stephens <[email protected]> wrote:
Hi Steve,
This does not ring any bells, however I would suggest that you file a support
case. If it
is an option you might try a later release (7.0).
Bruce
Steve Alexander wrote:
Hi,
I currently have an EJB that returns a String[] array that I have implementedas
a Web Service. When I execute a Java client (JSP) from Weblogic, I don'thave a problem
as long as the returned array is relatively small, but when the arraystarts to get
a little larger (say 20 elements, about 30 chars each), I consistentlyget:
SAXException: java.lang.IllegalArgumentException:array element type mismatch.
Strangely enough, when my web service client is a .asp page running underMS IIS
(using the MS SOAP Toolkit), it works fine. I have returned as many as15000 - 20000
array elements in one call. And since I am calling the same Weblogic
EJB
with the
MS client, I know it's a problem with the Java client, not the EJB.
Anybody know of a bug or had this experience before? Or know what I mightbe doing
wrong? FYI, I am using Weblogic 6.1 SP2.
Thanks,
Steve
Similar Messages
-
How to return List or Array from Web Service without using ADF?
All,
I would like to know how to do this before I use ADF. Sounds like a simple thing to do - common even - but I haven't found a solution in existing postings. My attempts have failed though I'm not sure exactly why.
I have created a declarative WS that takes a single parameter and tries to return a List<Employees> resultset. My Sample Java Client works just fine. When I change the result type from List to String[], for example, it also works fine.
What am I doing wrong??
Thanks
package wizard;
(imports removed for readability)
@WebService(name = "MyWebService1", serviceName = "MyWebService1", portName = "MyWebService1SoapHttpPort")
@Deployment(restSupport = true)
public class HelloWorld {
List<Employees> employees = null;
public HelloWorld() {
public List<Employees> sayHello (String s) {
try {
final Context context = getInitialContext();
ATOABPFacade aTOABPFacade = (ATOABPFacade)context.lookup("ATOABPFacade");
employees = aTOABPFacade.queryEmployeesFindByName(s);
return employees;
} catch (Exception ex) {
ex.printStackTrace();
return employees;
private static Context getInitialContext() throws NamingException {
return new InitialContext();
Trace:
Ready message received from Oc4jNotifier.
Embedded OC4J Server startup time: 24063 ms.
Target URL -- http://localhost:8988/JPA-Wizard-context-root/mywebservice1soaphttpport
Feb 18, 2008 7:42:49 PM com.evermind.server.ServerBase log
WARNING: JPA-Wizard-webapp: Error preloading servlet
javax.servlet.ServletException: java.lang.NullPointerException
at oracle.j2ee.ws.server.provider.ProviderServlet.init(ProviderServlet.java:186)
at javax.servlet.GenericServlet.init(GenericServlet.java:241)
at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2674)
at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:5162)
at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:5085)
at com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:5275)
at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1357)
at com.evermind.server.http.HttpApplication.init(HttpApplication.java:873)
at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:699)Gi,
not sure what you are doing there, but you can build the J2EE WebService from your working POJO, and create a Web Service proxy class from the WSDL description (of the deployed or local WSDL file). Then, using the proxy class, you can access the output of the WebService.
Frank -
Error when calling BPEL process from web service client
I have created three projects here ,there're no problem when testing Composite Application(SynchronousSampleApplication) by test case inside this project.
When I create a Java Application(SynchronousSampleApp),inside this project I've created a web service client from file WSDL of BPEL. After that, In Main class, I call an operation from web service client.But have the following error:
Jul 17, 2008 4:48:22 PM synchronoussampleapp.Main main
SEVERE: null
java.rmi.RemoteException: HTTP transport error: java.net.MalformedURLException: For input string: "${HttpDefaultPort}"; nested exception is:
HTTP transport error: java.net.MalformedURLException: For input string: "${HttpDefaultPort}"
at SynSample.SynchronuosSamplePortType_Stub.synchronuosSampleOperation(SynchronuosSamplePortType_Stub.java:83)
at synchronoussampleapp.Main.main(Main.java:24)
Caused by: HTTP transport error: java.net.MalformedURLException: For input string: "${HttpDefaultPort}"
at com.sun.xml.rpc.client.http.HttpClientTransport.invoke(HttpClientTransport.java:140)
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:96)
at SynSample.SynchronuosSamplePortType_Stub.synchronuosSampleOperation(SynchronuosSamplePortType_Stub.java:67)
... 1 more
Please help me soon. Thanks very much!Can't anyone help me? I'm using Netbean 6.1 and Glassfish server.
Do I need any additional plugin? -
Return 2D array from web service
Hi All,
I am new to web services development and start developing web service using net bean 6.9. I want to create the web service which needs to return the 2-d array. So i created it like this
public Object[][] getData(@WebParam(name = "startDate")
String startDate, @WebParam(name = "endDate")
String endDate) {
HashMap hm= new HashMap();
hm.put("key1", "val1");
hm.put("key2", "val2");
Object[][] twoDarray = new String[hm.size()][2];
Object[] keys = hm.keySet().toArray();
Object[] values = hm.values().toArray();
for (int row = 0; row < twoDarray.length; row++) {
twoDarray[row][0] = keys[row];
twoDarray[row][1] = values[row];
return twoDarray;
But when i test the web service using SOAPui then it did not returning anything. Can anyone guide me where is the problem??
Thanks
ShujaGi,
not sure what you are doing there, but you can build the J2EE WebService from your working POJO, and create a Web Service proxy class from the WSDL description (of the deployed or local WSDL file). Then, using the proxy class, you can access the output of the WebService.
Frank -
Returning XML to client from web service
Hi,
I am new to developing web services using JAX_RPC. I am trying to return a xml document to the client from the web service.
My Server implementation is as follows:
Interface:
public interface OntoIF extends Remote
public DataHandler ontoCompare (String targetUrl,String sourceUrl ) throws RemoteException;
Implementaion:
public class OntoImpl implements OntoIF
public DataHandler ontoCompare (String targetUrl,String sourceUrl ) throws RemoteException
DataHandler dataHandler = new DataHandler( new StreamSource( new File ("status.xml")), "text/xml");
return dataHandler;
Client Implementation:
Stub stb = (Stub) (new OntoService_Impl().getOntoIFPort());
stb._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,
"http://localhost:8080/onto-service/onto");
OntoIF onto = (OntoIF) stb;
DataHandler retDHandler = onto.ontoCompare(targetOntoUrl, sourceOntoUrl);
When I compile and run my client, it throws the following error -
java.rmi.ServerException: JAXRPCSERVLET28: Missing port information
at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.ja
va:497)
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:294
at sstub.OntoIF_Stub.echoDataHandler(OntoIF_Stub.java:122)
at sstub.OntoClient.main(OntoClient.java:63)
Can you please let me know what I am doing wrong? I have no problems in sending a DataHandler but receiving the DataHandler from the web service throws errors.
Thanks!Hi I'm having the same problem. I try to set up a Web Service using JAX_RPC. My WS should invoke a native Method implemented in C++. Did you got a solution for this issue? My Error Message is as follows:
java.rmi.ServerException: JAXRPCSERVLET28: Missing port information
at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:497)
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:294)
at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:80)
at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:489)
at com.sun.xml.rpc.client.dii.CallInvocationHandler.doCall(CallInvocationHandler.java:122)
at com.sun.xml.rpc.client.dii.CallInvocationHandler.invoke(CallInvocationHandler.java:86)
at $Proxy0.getHello(Unknown Source)
at com.neuhaus.test.ws.client.NativeInvokeClient.main(NativeInvokeClient.java:44)
Exception in thread "main"
greetings, JAN -
Return arrary of objects from web service
Hello ALL,
This problem has stumped me for several days.
I have a web service and a jsp client. the jsp client call the web service. the web service function return an array of object of DataBaseRecord type. I use XFire + MyEclipse + Tomcat to develop this project in a Linux box.
the web service WelcomeYou is defined as follows
{noformat}public List<DataBaseRecord> WelcomeYou(String ExampleDoc)
List<DataBaseRecord> RetrievalResult = new ArrayList<DataBaseRecord>();
// Search relevant documents according to 'ExampleDoc' from a database
// The search result will be put into a RecordSet object 'rs'
while(rs.next())
DataBaseRecord NewRecord = new DataBaseRecord ();
NewRecord.RetrievedDocID = rs.getString("RetrievalDocID");
NewRecord.SimiScore = Float.valueof(rs.getString("SimiScore"));
RetrievalResult.add(NewRecord );
// I use the following for loop to see the content of RetrievalResult. I can see that the content is just what I expect. Additionally, the size of RetrievalResult is correct too.
for(DataBaseRecord databaserecord : RetrievalResult)
System.out.println(databaserecord.RetrievedDocID + databaserecord.SimiScore);
return RetrievalResult;{noformat}in a jsp file, the web service WelcomeYou is called
{noformat}List<DataBaseRecord> Result = new List<DataBaseRecord>();
Result = srvc.WelcomeYou("some text ");
// I use the following for loop to see the contentof Result, but each element of Result is empty. Moreover, the strange thing is that the size of Result is right.
for(DataBaseRecord databaserecord : Result)
System.out.println(databaserecord.RetrievedDocID + databaserecord.SimiScore);
{noformat}the class DataBaseRecord is defined as follows
{noformat}public class DataBaseRecord{
public String RetrievedDocID;
public float SimiScore;
{noformat}At the very end of the service function body(just before ' return RetrievalResult;'), i check the content of RetrievalResult using a for loop, it is correct.
At the jsp file, immediately after the statement
{noformat} Result = srvc.WelcomeYou("some text ");
{noformat}
{code}
, i check the content of Result using a for loop, it is incorrect except for the size of Result .
I wonder where I am wrong in the above code.Can you show the UserProfile.java ? That may have some variables, which are not supported in web services.
-
Return List of object from web service
Hi to all.
I have a java class which returns an array of ojects (custom objects).
With jdeveloper tool i would like to create a ws around my class, but i receive this message:
Method getUsers: The following JavaBean parameters have property descriptors using types that do not have an XML Schema mapping and/or serializer specified:
Code is the following:
public class GETUSERS
//Costruttore di default
public GETUSERS(){}
public UserProfile[] getUsers(String LastName,String Name)
CallableStatement proc = null;
ResultSet rs = null;
UserProfile users[] = null;
int cont=0;
try
Connessione connessione = new Connessione();
Connection conn = connessione.getJNDIConnection();
if (conn != null )
proc = conn.prepareCall("{call procedure(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) }");
//Cursore di output
proc.registerOutParameter(1, oracle.jdbc.OracleTypes.CURSOR);
proc.setInt(2,1);
proc.setInt(3,100);
proc.setString(4,null);
proc.setString(5,LastName);
proc.setString(6,Name);
proc.setString(7,null);
proc.setString(8,null);
proc.setString(9,null);
proc.setString(10,"n");
proc.setString(11,null);
proc.setString(12,null);
proc.executeQuery();
rs = (ResultSet)proc.getObject(1);
rs.last();
users= new UserProfile[rs.getRow()];
rs.beforeFirst();
while (rs.next())
users[cont].setUID(rs.getString(1));
users[cont].setName(rs.getString(2));
cont++;
rs.close();
proc.close();
catch(Exception ex)
System.out.println(ex.getMessage());
return users;
}Any idea?
ThanksCan you show the UserProfile.java ? That may have some variables, which are not supported in web services.
-
Error when using byte array in web service model interface
Hello everybody,
I'm using a web service model in my web dynpro application. The web service requires a byte array as import parameter.
When starting the web dynpro application the following error occurs:
com.sap.tc.webdynpro.services.exceptions.WDTypeNotFoundException: type java:byte not found
at com.sap.tc.webdynpro.services.datatypes.core.DataTypeBroker.getDataType(DataTypeBroker.java:216)
I'm using byte arrays several times in my application --> no problem. So why does the error say "byte not found" when using the web service?
Thanks for your help!
regards
ChristianHi,
maybe this is the problem. The type is byte and not binary.
But I have the same problem as mentioned in the other thread: I can't change the type.
The type in the WSDL of my web service is "base64binary". Is there maybe a possibility to import a jar-file for this type?
Christian -
Error in calling a method from Web services
Hai Experts,
When i try calling a method in web services from webdyn pro its not being called, i get a error SAOPFAULTCODE: 1 . wat might be the problem? The thing i am working with is tat when a employee try to create a FTR(HCM : Travel), a check has to be done in web services and then allow certain employees to proceed and rest should get a error msg but, i could find all the employees r getting the same error msg . Please resolve this issue.
Regards and thanks in advance,
Srija.Hello,
Add the line :
SET_REPORT_OBJECT_PROPERTY(RAP,REPORT_DESNAME,'test.rdf');
before
VRAP:=RUN_REPORT_OBJECT(RAP);
(Of course, 'test.rdf" is an example, replace it by the name of the reports who want to execute)
Regards -
ClassNotFound Error while accessing Shared Libarary from Web Service WAR
Hi All,
I have developed a JAX-WS based Web Service(WAR file) using Jdeveloper 11g and deployed it to Web Logic 10.3.4 server. My web service requires access to a shared library(a JAR file ) which is already deployed on the server. So, I had modified the MANIFEST.MF file to have the reference to shared library as a
optional package(since my web service is WAR) as below.
Manifest-Version: 1.0
Extension-List: bizlib
bizlib-Extension-Name: biz_lib
bizlib-Implementation-Version: Oracle Version 1.1
The biz_lib is the Name of the library as seen in the Deployments section of the Web Logic Admin Console. Since there is no extension name given explicitly in the MANIFEST file of shared library, I have mentioned the name as seen in the deployments for the library. After deploying my WAR, when I go into the details of the Shared Library - biz_lib, the Admin console shows my web Service as part of - "Applications that reference this Library" section. So, I presume that my Manifest is correct. But when I test my web service from Admin Console, I face - java.lang.NoClassDefFoundError. The class that is pointed out as part of the error is part of the referenced Shared Library - biz_lib ( part of a JAR file that is listed in the Class-Path: section of shared library’s MANIFEST file). My Web Application is unable to find the class files in the shared library. Please help me. Please let me know any further information is required.
Regards,
RamI am not sure if this helps. I encountered a similar problem and
finally resolved it. Initially I got the error 500 - Internal
Server error, and was not able to access my servlet which I deployed
using .war file.
We should make sure that the directory structure under
WEB-INF/classes directory should reflect the package that
your servlet belongs to. I had a HelloWorld servlet with
the statement "package examples.servlets;" on the first line.
So after compiling this servlet, the HelloWorld.class file
should be copied into WEB-INF/classes/examples/servlets directory
and not into WEB-INF/classes directory. After making this change,
I made a new .war file and that fixed the problem.
-Balaji.
"san" <[email protected]> wrote:
>
>Hi,
>
> i depolyed a WAR file into WL 5.1 as a unzipped file,
>and when i tried to access sevlet it din't come up, i got a error
>"404 file not found,"
>
>my servlet classes are in WEB_INF/classes directory and i have register
>the servlet
>in WEB.xml file
>
>but still i couldn't access any servlet from my webApp ie WAR file ,
>
>can anyone help me out, Thanks in advance
-
Mapping Array string response from Web service
Hi
Need to map the response from a sync call to a WS which contains an array of strings the response message looks like:
- <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <SOAP-ENV:Body>
- <rpl:readAllRecFromDQStrArrayResponse xmlns:rpl="urn:AS400DBAccessVi">
- <rpl:Response xmlns:pns="urn:java/lang">
<pns:String>Row 1</pns:String>
<pns:String>Row 2</pns:String>
<pns:String>Row 3</pns:String>
</rpl:Response>
</rpl:readAllRecFromDQStrArrayResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Need to map it to the following MT:
WSResponse
Response String 1..unboundedHi Udo
This the the source and target:
SOURCE:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:AS400DBAccessWsd/AS400DBAccessVi/rpc" targetNamespace="urn:AS400DBAccessWsd/AS400DBAccessVi/rpc">
<xsd:import namespace="urn:java/lang" />
<xsd:element xmlns:ns1="urn:java/lang" name="Response" type="ns1:ArrayOfString" />
</xsd:schema>
TARGET:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://dubal.ae/SOP/SD003" targetNamespace="http://dubal.ae/SOP/SD003">
<xsd:element name="executeDQResponse" type="executeDQResponse" />
<xsd:complexType name="executeDQResponse">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
4c98a2b0c22d11dbbd74001125bd7544
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="String" type="xsd:string" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
09d279c0c01011dbb867001641ad833b
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Thanks -
Facing problem while going to catch return result from web-services.
Hi everybody,
I am new to BPEL. I am facing problem while going to catch the attributes of resultsets returning from web-services(QAS). As far as my knowledge, two types of results it should return - XML entities and another is attributes which is coming as the part of XML entitites. I am able to catch the XML entities, but can't catch the attributes under it. Even, I am not able to see whether web-services returning something within that field.
When, I tried to catch the attribute and store to a temporary varilable using the following code:
*<assign name="AssignQASDoGetAddress1">*
*<copy>*
*<from variable="InvokeQAS_DoSearch_OutputVariable"*
part="body"
query="/ns6:QASearchResult/ns6:QAPicklist/ns6:PicklistEntry/@PostcodeRecoded"/>
*<to variable="temp"/>*
*</copy>*
*</assign>*
but, I am facing the following selectionFailure errors after running it:
*"{http://schemasxmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown.*
-<selectionFailure xmlns="http://schemasxmlsoap.org/ws/2003/03/business-process/">
-<part name="summary">
*<summary>*
empty variable/expression result.
xpath variable/expression expression "bpws:getVariableData('InvokeQAS_DoSearch_OutputVariable', 'body', '/ns6:QASearchResult/ns6:QAPicklist/ns6:PicklistEntry/@PostcodeRecoded')" is empty at line 269, when attempting reading/copying it.
Please make sure the variable/expression result "bpws:getVariableData('InvokeQAS_DoSearch_OutputVariable', 'body', '/ns6:QASearchResult/ns6:QAPicklist/ns6:PicklistEntry/@PostcodeRecoded')"is not empty.
*</summary>*
*</part>*
*</selectionFailure>*
Getting this error it seems to me that web-service is returning nothing, but, it returns something as it has been catched using a method called isPostcodeRecoded() Java Code in Oracle ADF. This method has been used as it should return boolean whereas for catching the xml entities using java code we used the method like getPostcode(), getMoniker().
For your information, we are using Jdeveloper as the development tool for building the BPEL process.
Am I doing any syntax error. Please consider it as urgent and provide me asolution.
Thanks in advance.
Chandrachur.Thanks Dave and Marc, for your suggestions. Actually what I found is QAS web-service is returning nothing as attributes when the attributes are set to the default value. For example, following is the part of the wsdl of the result which QAS webservice returns.
<xs:element name="QASearchResult">
- <xs:complexType>
- <xs:sequence>
<xs:element name="QAPicklist" type="qas:QAPicklistType" minOccurs="0" />
<xs:element name="QAAddress" type="qas:QAAddressType" minOccurs="0" />
</xs:sequence>
<xs:attribute name="VerifyLevel" type="qas:VerifyLevelType" default="None" />
</xs:complexType>
</xs:element>
<xs:complexType name="QAPicklistType">
- <xs:sequence>
<xs:element name="FullPicklistMoniker" type="xs:string" />
<xs:element name="PicklistEntry" type="qas:PicklistEntryType" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="Prompt" type="xs:string" />
<xs:element name="Total" type="xs:nonNegativeInteger" />
</xs:sequence>
<xs:attribute name="AutoFormatSafe" type="xs:boolean" default="false" />
<xs:attribute name="AutoFormatPastClose" type="xs:boolean" default="false" />
<xs:attribute name="AutoStepinSafe" type="xs:boolean" default="false" />
<xs:attribute name="AutoStepinPastClose" type="xs:boolean" default="false" />
<xs:attribute name="LargePotential" type="xs:boolean" default="false" />
<xs:attribute name="MaxMatches" type="xs:boolean" default="false" />
<xs:attribute name="MoreOtherMatches" type="xs:boolean" default="false" />
<xs:attribute name="OverThreshold" type="xs:boolean" default="false" />
<xs:attribute name="Timeout" type="xs:boolean" default="false" />
</xs:complexType>
<xs:complexType name="PicklistEntryType">
- <xs:sequence>
<xs:element name="Moniker" type="xs:string" />
<xs:element name="PartialAddress" type="xs:string" />
<xs:element name="Picklist" type="xs:string" />
<xs:element name="Postcode" type="xs:string" />
<xs:element name="Score" type="xs:nonNegativeInteger" />
</xs:sequence>
<xs:attribute name="FullAddress" type="xs:boolean" default="false" />
<xs:attribute name="Multiples" type="xs:boolean" default="false" />
<xs:attribute name="CanStep" type="xs:boolean" default="false" />
<xs:attribute name="AliasMatch" type="xs:boolean" default="false" />
<xs:attribute name="PostcodeRecoded" type="xs:boolean" default="false" />
<xs:attribute name="CrossBorderMatch" type="xs:boolean" default="false" />
<xs:attribute name="DummyPOBox" type="xs:boolean" default="false" />
<xs:attribute name="Name" type="xs:boolean" default="false" />
<xs:attribute name="Information" type="xs:boolean" default="false" />
<xs:attribute name="WarnInformation" type="xs:boolean" default="false" />
<xs:attribute name="IncompleteAddr" type="xs:boolean" default="false" />
<xs:attribute name="UnresolvableRange" type="xs:boolean" default="false" />
<xs:attribute name="PhantomPrimaryPoint" type="xs:boolean" default="false" />
</xs:complexType>
here the attributes like FullAddress, PostcodeRecodedare , etc. are not being return by the web-service when it is getting the default value false. But, if it gets true then , it is being displayed at the BPEL console.
Do you have any idea how can I catch the attributes and its value even when it gets the default value which is already set. Previously, it was returning(it was not being displayed at the console).
Thanks once again for your valuable suggestions...!!!
Chandrachur. -
Returning table structure from Web Service...
Hi,
I have a web service which retrieves data from a database table. I want to use this web service from my Visual Composer to display the data on the screen.
I want to know how to return the table structure from my web service. Currently i am returning a string array (only one row of data) from my web service and displaying it in the VC. But i want to include the names of the columns as well.
I tried using 2D String[] and HashMap, both didn't work for me.
Any ideas?
Regards,
VenkatHi Venkat,
I recommend to pass the headers in seperat variables and the data table in a array.
I did something similar, without the header, because they are fixed in my scenario.
This webservice returns a list of all Portal Roles:
public roleModel[] getRoles() throws Exception{
// Array List as return value
ArrayList RoleList = new ArrayList();
// Try Block reading portal roles
try {
IRoleFactory rfact = UMFactory.getRoleFactory();
// Filter for PortalRoles
IRoleSearchFilter roleFilter = rfact.getRoleSearchFilter();
// Search for *
roleFilter.setUniqueName("*", ISearchAttribute.EQUALS_OPERATOR, false);
// Search all Roles
ISearchResult resultList = rfact.searchRoles(roleFilter);
// return the result list
if (resultList.getState() == ISearchResult.SEARCH_RESULT_OK) {
while (resultList.hasNext()) {
// read roleUid
String roleUid = (String) resultList.next();
// create roleObject for roleUid
IRole roleObject = rfact.getRole(roleUid);
// instantiate new role for ArrayList
roleModel rolle = new roleModel();
// read DisplayName and UniqeID
rolle.setRole(roleObject.getDisplayName());
rolle.setRoleID(roleObject.getUniqueID());
rolle.setDescription(roleObject.getDescription());
// add object to ArrayList
RoleList.add(rolle);
// create new array from data type model roleModel (class)
// in the correspoding size
roleModel[] returnList = new roleModel[RoleList.size()];
// write ArrayList back to array
RoleList.toArray(returnList);
// return all portal roles
return returnList;
// exception handling
} catch (Exception e) {
throw new Exception(e);
Hope that helps!
Best Regards,
Marcel -
Return Table Structure from Web Service...
Hi,
I have a web service which retrieves data from a database table. I want to use this web service from my Visual Composer to display the data on the screen.
I want to know how to return the table structure from my web service. Currently i am returning a string array (only one row of data) from my web service and displaying it in the VC. But i want to include the names of the columns as well.
I tried using 2D String[] and HashMap, both didn't work for me.
Any ideas?
Regards,
VenkatHi,
I have a web service which retrieves data from a database table. I want to use this web service from my Visual Composer to display the data on the screen.
I want to know how to return the table structure from my web service. Currently i am returning a string array (only one row of data) from my web service and displaying it in the VC. But i want to include the names of the columns as well.
I tried using 2D String[] and HashMap, both didn't work for me.
Any ideas?
Regards,
Venkat -
401 Unauthorized Error When calling a SharePoint REST web service from SharePoint 2013 Workflow
We have our Workflow Manger installed on the same server as our SharePoint 2013 WFE development environment. When creating a SharePoint 2013 Workflow all Calls to a SharePoint 2013 REST web service results in a 401 Unauthorized error.
As an example I created a simple workflow that should return a JSON result. The REST Url returns the results in the browser without error.
Set Variable:webServiceUrl to https://<hostnamedsitecollection>/_vti_bin/client.svc/web/lists/getbytitle('ISR%20Approvers')/Items?$select=Title&$filter=Title%20eq%20%27General%27
then Build{...} Dictionary (Output to Variable:requestHeaders)
then Call [%Variable:webServiceUrl%] HTTP web service with request (ResponseContent to Variable:responseContent |ResponseHeaders to responseHeaders | ResponseStatusCode to Variable:responseCode)
The RequestHeader is set to the requestHeaders variable though the web service call properties
then Log Variable:responseCode to the workflow history list
After manually running the workflow in SharePoint on a list item in the ISR Approvers list it Logs "Unauthorized" in the Workflow History Log. It does this with every SharePoint REST web service call that I have tried through the workflow.
It doesn't have anything to do with the Workflow Manger being installed on the same machine as the SharePoint WFE does it?
Thank You for any insightHi,
According to your post, my understanding is that you had 401 Unauthorized Error when calling a SharePoint REST web service from SharePoint 2013 Workflow.
Please make sure you use the ‘Call HTTP Web Service’ correctly.
You can enter the URL into the brower to check whether it is correctly.
You need to
create the Request header requestHeaders
using a Dictionary:
Accept : application/json;odata=verbose
Content-Type : application/json;odata=verbose
To associate the
requestHeaders variable, select the Call action
property, set the RequestHeaders property to
requestHeaders.
Please refer to the following articles:
Working with Web Services in SharePoint 2013 Workflows using SharePoint Designer 2013
Calling the SharePoint 2013 Rest API from a SharePoint Designer
Workflow
In addtion, you need to make sure you install the workflow manager correctly.
More information:
Install and configure workflow for SharePoint Server 2013
Known Issues in Workflow Manager 1.0
Troubleshooting Workflow Manager 1.0 Management and Execution
Best Regards,
Linda Li
Linda Li
TechNet Community Support
Maybe you are looking for
-
Can't send PDF as a mail attachment from iPad to a Lotus Notes account
Hello, I have some problems sending PDF documents as email attachments from my iPad. Using the adobe reader app for iOS, I create an email with the file attached. Sending this to e.g. a hotmail account works fine. However, if I send it to any address
-
Lion + airplay = troublesome
Hi all, I bough an Imac for my mom and thought installing all the peripherals in an afternoon. That afternoon turned out to be my longest one ever. After one month of struggling, things are still not working properly. -OS Lion through ethernet cable
-
CPU Patch Problem in One of DB instance
Hi Gurus's, On AIX two Oracle DB(11gr2) instances are running(D1 and D2). I successfully applied "CPUApr2013" to D1 and same information is reflecting in "registry$history" , but on second instance "D2" after excuting "*SQL> @catbundle.sql cpu apply*
-
Rollback segment for set transaction
there is way that i can setup a rollback segment for a spacific user or specific transction. ALTER ROLLBACK SEGMENT big_rbs ONLINE; SET TRANSACTION USE ROLLBACK SEGMENT big_rbs; sql ..... commit; ALTER ROLLBACK SEGMENT big_rbs OFFLINE; the sql is goi
-
File System Watcher of Powershell on Opening a Folder
Sorry for double post, since my last post is posted in wrong place. I am trying to build a file system watcher on my computer with Windows 7. I am using FileSystemWatcher of Powershell, it works quite good! I can monitor file/folder creating, deletin