WSDL first. Namespace of complx type's child elements.
Hello!
I've got strange (for me) behavior of wscompile.
I started to develop a web service from a WSDL definition (document-literal). I built two services built on the written WSDL: one in Java (was deployed to JBoss) and one in .Net. Also I wrote a Java client that should be talking to either .Java or Net service.
The Java client communicates with .Net service properly. But doesn’t work with Java one. It fails to desterilise the structure.
My schema was defined with elementFormDefault="qualified", attributeFormDefault="unqualified". And there was a type that consists of some child elements. After comparing the SOAP messages from the services I payed attention that the Java service doesn’t define a namespace for child elements:
From .Net:
<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<FindUserResponse xmlns="http://echo.test/types">
<User name="First" surname="Unknown"/>
<User name="Second" surname="Unknown"/>
</FindUserResponse>
</soap:Body>
</soap:Envelope>
From Java:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/ xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:FindUserResponse xmlns:ns1="http://echo.test/types">
<User name="Mr.First" surname="Unknown"/>
<User name="Mr.Second" surname="Unknown"/>
</ns1:FindUserResponse>
</soapenv:Body>
</soapenv:Envelope>
So I think wscompile generates the server side type serialization wrongly - child elements of complex structure are unqualified. But the client code is generated properly.
When I defined in WSDL that the child elements of my complex type has an attribute: form="unqualified" and recompiled the services and the client, everything starts working.
Does somebody have any clue of the reason of such strange behaviour?
Thanks in advance.
I have the same problem.Jboss+Wscompile, and I in the Sopa response elements are not qualified. could you fix this issue? I need to use type substitution and I can not ahve unqualified as default.
Similar Messages
-
WSDL & local qualified accessors (complex type - child elements)
Why does the WLS8.1 generated WSDL file specify
elementFormDefault="qualified" in the schema for complex types.
The resulting runtime SOAP bodies that are sent have unqualified child
elements and tools like JAX-RPC, determine from the WSDL schema that these
child elements SHOULD be qualified and fail to parse the body. I understand
that the spec states that they should not be qualified but then why does the
schema not specify
elementFormDefault="unqualified"?
I have to manually edit the WSDL (to say "unqualified") to generate a client
using JAX-RPC.
Is there some way I can tell <wsdlgen> task to do this?
Thanks,
M
Here's the excerpt from my WLS 8.1 generated WSDL file:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tp="java:com.xxx.framework.persist"
xmlns:stns="java:com.xxx.businessservices.indexservice.valueobjects"
elementFormDefault="qualified"
attributeFormDefault="qualified"
targetNamespace="java:com.xxx.businessservices.indexservice.valueobjects">
<xsd:import namespace="java:com.xxx.framework.persist" />
<xsd:import namespace="java:language_builtins.util" />
<xsd:complexType name="IndexVO">
<xsd:complexContent>
<xsd:extension xmlns:tp="java:com.xxx.framework.persist"
base="tp:FW_PersistentObject">
<xsd:sequence>
<xsd:element type="xsd:string" name="code" minOccurs="1" nillable="true"
maxOccurs="1" />
<xsd:element type="xsd:string" name="description" minOccurs="1"
nillable="true" maxOccurs="1" />
<xsd:element type="xsd:long" name="indexID" minOccurs="1" maxOccurs="1"
/>
<xsd:element type="stns:IndexProviderVO" name="indexProviderVO"
minOccurs="1" nillable="true" maxOccurs="1" />
<xsd:element type="stns:IndexSourceVO" name="indexSourceVO" minOccurs="1"
nillable="true" maxOccurs="1" />
<xsd:element type="xsd:string" name="name" minOccurs="1" nillable="true"
maxOccurs="1" />
<xsd:element type="xsd:dateTime" name="nextUpdateDate" minOccurs="1"
nillable="true" maxOccurs="1" />
<xsd:element type="xsd:long" name="providerID" minOccurs="1"
maxOccurs="1" />
<xsd:element type="xsd:long" name="scheduleID" minOccurs="1"
maxOccurs="1" />
<xsd:element type="stns:UpdateScheduleVO" name="scheduleVO" minOccurs="1"
nillable="true" maxOccurs="1" />
<xsd:element type="xsd:long" name="sourceID" minOccurs="1" maxOccurs="1"
/>
<xsd:element xmlns:tp="java:language_builtins.util" type="tp:List"
name="updateFrequencies" minOccurs="1" nillable="true" maxOccurs="1" />
<xsd:element xmlns:tp="java:com.xxx.framework.persist"
type="xsd:dateTime" name="updatesDisabledDate" minOccurs="1" nillable="true"
maxOccurs="1" />
<xsd:element xmlns:tp="java:language_builtins.util" type="tp:List"
name="values" minOccurs="1" nillable="true" maxOccurs="1" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
"Scott Ziegler" <[email protected]> wrote in message
news:[email protected]...
On Mon, 21 Jul 2003 09:31:45 -0500, Mark Fine wrote:
I've been debugging an XML-RPC generated client and came across the
following problem:
I have a webserice serialized Object, "IndexVO" that has an attribute
(ie.
element) "code".
The WLS8.1 generated WSDL schema declares that code is in the
"com...valueobjects" namespace by virtue of a default (target)namespace.
At runtime, the SOAP envelope that is created seems to put the
attribute/element "code" in the EMPTY namespace, and not in the
"com...valueobjects" namespace. The XML-RPC generated client code is
looking for "code" in the "com...valueobjects" namespace and skips overit
because it is in the "", blank namespace (according to the XML parser).
I'm not a XML expert but from what I can tell, the SOAP envelope that is
returned does not match the WSDL file with respect to the namespace ofthe
attributes in IndexVO.
Am I reading this wrong?We did this for interoperability reasons. Some other stacks that we were
trying to work with would not work if those elements were qualified. The
problem really stems from SOAP 1.1:http://www.w3.org/TR/SOAP/#_Toc478383520
>
"Accessors whose names are local to their containing types have
unqualified element names; all others have qualified names."
SOAP stacks that are not schema aware basically require this behavior.
You might try using a doc-literal service (which is more faithful to the
schema) if that fits your situation.
--ScottCurrently there is no option to make elementFormDefault
unqualified. I filed an enhancement CR (112776).
Regards,
-manoj
http://manojc.com
"Mark Fine" <[email protected]> wrote in message
news:[email protected]...
Why does the WLS8.1 generated WSDL file specify
elementFormDefault="qualified" in the schema for complex types.
The resulting runtime SOAP bodies that are sent have unqualified child
elements and tools like JAX-RPC, determine from the WSDL schema that these
child elements SHOULD be qualified and fail to parse the body. Iunderstand
that the spec states that they should not be qualified but then why doesthe
schema not specify
elementFormDefault="unqualified"?
I have to manually edit the WSDL (to say "unqualified") to generate aclient
using JAX-RPC.
Is there some way I can tell <wsdlgen> task to do this?
Thanks,
M
Here's the excerpt from my WLS 8.1 generated WSDL file:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tp="java:com.xxx.framework.persist"
xmlns:stns="java:com.xxx.businessservices.indexservice.valueobjects"
elementFormDefault="qualified"
attributeFormDefault="qualified"
targetNamespace="java:com.xxx.businessservices.indexservice.valueobjects">
<xsd:import namespace="java:com.xxx.framework.persist" />
<xsd:import namespace="java:language_builtins.util" />
<xsd:complexType name="IndexVO">
<xsd:complexContent>
<xsd:extension xmlns:tp="java:com.xxx.framework.persist"
base="tp:FW_PersistentObject">
<xsd:sequence>
<xsd:element type="xsd:string" name="code" minOccurs="1"nillable="true"
maxOccurs="1" />
<xsd:element type="xsd:string" name="description" minOccurs="1"
nillable="true" maxOccurs="1" />
<xsd:element type="xsd:long" name="indexID" minOccurs="1" maxOccurs="1"
/>
<xsd:element type="stns:IndexProviderVO" name="indexProviderVO"
minOccurs="1" nillable="true" maxOccurs="1" />
<xsd:element type="stns:IndexSourceVO" name="indexSourceVO"minOccurs="1"
nillable="true" maxOccurs="1" />
<xsd:element type="xsd:string" name="name" minOccurs="1"nillable="true"
maxOccurs="1" />
<xsd:element type="xsd:dateTime" name="nextUpdateDate" minOccurs="1"
nillable="true" maxOccurs="1" />
<xsd:element type="xsd:long" name="providerID" minOccurs="1"
maxOccurs="1" />
<xsd:element type="xsd:long" name="scheduleID" minOccurs="1"
maxOccurs="1" />
<xsd:element type="stns:UpdateScheduleVO" name="scheduleVO"minOccurs="1"
nillable="true" maxOccurs="1" />
<xsd:element type="xsd:long" name="sourceID" minOccurs="1"maxOccurs="1"
/>
<xsd:element xmlns:tp="java:language_builtins.util" type="tp:List"
name="updateFrequencies" minOccurs="1" nillable="true" maxOccurs="1" />
<xsd:element xmlns:tp="java:com.xxx.framework.persist"
type="xsd:dateTime" name="updatesDisabledDate" minOccurs="1"nillable="true"
maxOccurs="1" />
<xsd:element xmlns:tp="java:language_builtins.util" type="tp:List"
name="values" minOccurs="1" nillable="true" maxOccurs="1" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
"Scott Ziegler" <[email protected]> wrote in message
news:[email protected]...
On Mon, 21 Jul 2003 09:31:45 -0500, Mark Fine wrote:
I've been debugging an XML-RPC generated client and came across the
following problem:
I have a webserice serialized Object, "IndexVO" that has an attribute
(ie.
element) "code".
The WLS8.1 generated WSDL schema declares that code is in the
"com...valueobjects" namespace by virtue of a default (target)namespace.
At runtime, the SOAP envelope that is created seems to put the
attribute/element "code" in the EMPTY namespace, and not in the
"com...valueobjects" namespace. The XML-RPC generated client code is
looking for "code" in the "com...valueobjects" namespace and skips
over
it
because it is in the "", blank namespace (according to the XML
parser).
>>>
I'm not a XML expert but from what I can tell, the SOAP envelope thatis
returned does not match the WSDL file with respect to the namespace ofthe
attributes in IndexVO.
Am I reading this wrong?We did this for interoperability reasons. Some other stacks that we
were
trying to work with would not work if those elements were qualified.The
problem really stems from SOAP 1.1:
http://www.w3.org/TR/SOAP/#_Toc478383520
"Accessors whose names are local to their containing types have
unqualified element names; all others have qualified names."
SOAP stacks that are not schema aware basically require this behavior.
You might try using a doc-literal service (which is more faithful to the
schema) if that fits your situation.
--Scott -
Manual WSDL creation with Complex data types
I'm trying to manually generate a WSDL, for a bpel workflow, so the wsdl constructs do not come from a Java class file, or any of the other normal ways you might generate a WSDL.
I have successfully created a Definition object from the WSDLFactory, with the code shown below, that appears to be correct, based on reverse engineering of a WS compliant WSDL. The reversed engineered WSDL was created by IONA Artix.
When I use file WSDLFactoryImpl.WSDLWriterImpl.writeWSDL() to write the WSDL file I get the wsdl:types and wsdl:service definition objectsin the file, but not the wsdl:message, wsdl:portType or wsdl:binding objects.
The reverse engineered WSDL file has been imported into objects via WSDLReaderImpl, and the resulting Definition object appears correct (based on all system.outs). This definition can be successfully written to file via the same WSDLFactoryImpl.WSDLWriterImpl.writeWSDL(). which results in a correct WSDL file.
I'm hoping someone can spot my problem.
Chris Yoerg
WSDLFactory.java************************************************************************************************
package com.dralasoft.bpel.util;
import java.util.*;
import java.io.*;
import javax.xml.namespace.QName;
import javax.xml.parsers.*;
import javax.wsdl.WSDLException;
import javax.wsdl.extensions.UnknownExtensibilityElement;
import org.w3c.dom.*;
import com.ibm.wsdl.*;
import com.ibm.wsdl.factory.WSDLFactoryImpl;
import com.ibm.wsdl.extensions.soap.*;
/** This class generates a wsdl from scratch
* the way the namespaces have been left seem to be correct in that the individual
* porttype, binding and service objects pick up the message parts as seen in the
* individual system.outs and in the system.out of the definition
* if you use the tns prefix iteration as seen in the comment out "trial" code
* you get an error that the tns namespace does not exist in the definition
* even though it is definitely there
* the non namespace "trial" code also behaves the same way as this iteration,
* aka the stuff shows in the definition outputs, but never ends up outputed to
* file */
//import com.dralasoft.bpel.BPELWorkflow;
public class WSDLFactory {
public WSDLFactory() {
public void makeWorkflowWSDL(){
WSDLFactoryImpl factory = null;
Constants constants = new Constants();
SOAPConstants soapconstants = new SOAPConstants();
try {
factory = (WSDLFactoryImpl) WSDLFactoryImpl.newInstance();
catch (WSDLException we) {
System.out.println("wsdl excepiotn " + we.getMessage());
// get a new definition from the factory
DefinitionImpl definition = (DefinitionImpl) factory.newDefinition();
// add target namespace and additional namespaces that might be there
definition.setTargetNamespace("http://www.yoerg.net");
definition.addNamespace("tns", "http://www.yoerg.net");
definition.addNamespace("soap", "http://schemas.xmlsoap.org/wsdl/soap/");
definition.addNamespace("xsd", "http://www.w3.org/2001/XMLSchema");
definition.addNamespace("wsdl", "http://schemas.xmlsoap.org/wsdl/");
// added for generic purposes
definition.addNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
// specify the service name
QName qname = new QName("http://www.yoerg.net",
"PurchaseOrderProcess");
definition.setQName(qname);
// create types **********************************************************
TypesImpl types = (TypesImpl) definition.createTypes();
// generate a schema in DOM to set into the types object
javax.xml.parsers.DocumentBuilderFactory domfactory =
javax.xml.parsers.DocumentBuilderFactory.newInstance();
javax.xml.parsers.DocumentBuilder builder = null;
try {
builder = domfactory.newDocumentBuilder();
catch (javax.xml.parsers.ParserConfigurationException pce) {
System.out.println("parser config exception " + pce.getMessage());
DOMImplementation dImpl = builder.getDOMImplementation();
// namespace for the schema
String namespaceURI = "http://www.w3.org/2001/XMLSchema";
Document doc = dImpl.createDocument(namespaceURI, "schema", null);
Element schema = doc.getDocumentElement();
//schema.setPrefix("xsd");
schema.setAttribute("xmlns", "http://www.w3.org/2001/XMLSchema");
schema.setAttribute("targetNamespace", "http://www.yoerg.net");
//set other namespaces on schema
// this doesn't make it into the schema at final save, because there
// are no wsdl elements inside the box
schema.setAttribute("xmlns:wsdl", "http://schemas.xmlsoap.org/wsdl/");
// this is not needed
schema.setAttribute("tns", "http://www.yoerg.net");
Element first = doc.createElement("element");
first.setAttribute("name", "sendPurchaseOrder");
first.setAttribute("type", "tns:sendPORequest");
schema.appendChild(first);
Element fourth = doc.createElement("element");
fourth.setAttribute("name", "sendSchedule");
fourth.setAttribute("type", "tns:sendScheduleRequest");
schema.appendChild(fourth);
Element fifth = doc.createElement("element");
fifth.setAttribute("name", "sendInvoice");
fifth.setAttribute("type", "tns:sendInvoiceRequest");
schema.appendChild(fifth);
// now add correlations
Element corfirst = doc.createElement("element");
corfirst.setAttribute("name", "correlations");
corfirst.setAttribute("type", "tns:correlationset");
schema.appendChild(corfirst);
Element second = doc.createElement("element");
second.setAttribute("name", "portType");
second.setAttribute("type", "xsd:string");
schema.appendChild(second);
Element third = doc.createElement("element");
third.setAttribute("name", "partnerLink");
third.setAttribute("type", "xsd:string");
schema.appendChild(third);
// sequence element thats used over and over
Element sequence = null;
Element sixth = doc.createElement("complexType");
sixth.setAttribute("name", "sendPORequest");
sequence = doc.createElement("sequence");
Element part1 = doc.createElement("element");
part1.setAttribute("name", "customerId");
part1.setAttribute("type", "xsd:long");
sequence.appendChild(part1);
Element part2 = doc.createElement("element");
part2.setAttribute("name", "purchaseOrderNumber");
part2.setAttribute("type", "xsd:long");
sequence.appendChild(part2);
Element part3 = doc.createElement("element");
part3.setAttribute("name", "productId");
part3.setAttribute("type", "xsd:long");
sequence.appendChild(part3);
Element part4 = doc.createElement("element");
part4.setAttribute("name", "quantity");
part4.setAttribute("type", "xsd:int");
sequence.appendChild(part4);
sixth.appendChild(sequence);
schema.appendChild(sixth);
Element seventh = doc.createElement("complexType");
seventh.setAttribute("name", "sendScheduleRequest");
sequence = doc.createElement("sequence");
Element part6 = doc.createElement("element");
part6.setAttribute("name", "shipDate");
part6.setAttribute("type", "xsd:dateTime");
sequence.appendChild(part6);
Element part7 = doc.createElement("element");
part7.setAttribute("name", "customerId");
part7.setAttribute("type", "xsd:long");
sequence.appendChild(part7);
Element part8 = doc.createElement("element");
part8.setAttribute("name", "purchaseOrderNumber");
part8.setAttribute("type", "xsd:long");
sequence.appendChild(part8);
seventh.appendChild(sequence);
schema.appendChild(seventh);
Element eighth = doc.createElement("complexType");
eighth.setAttribute("name", "sendInvoiceRequest");
sequence = doc.createElement("sequence");
Element part5 = doc.createElement("element");
part5.setAttribute("name", "price");
part5.setAttribute("type", "xsd:double");
sequence.appendChild(part5);
Element part9 = doc.createElement("element");
part9.setAttribute("name", "customerId");
part9.setAttribute("type", "xsd:long");
sequence.appendChild(part9);
Element part10 = doc.createElement("element");
part10.setAttribute("name", "purchaseOrderNumber");
part10.setAttribute("type", "xsd:long");
sequence.appendChild(part10);
eighth.appendChild(sequence);
schema.appendChild(eighth);
Element ninth = doc.createElement("complexType");
ninth.setAttribute("name", "correlationset");
sequence = doc.createElement("sequence");
Element part11 = doc.createElement("element");
part11.setAttribute("name", "PurchaseOrder");
part11.setAttribute("type", "tns:correlationsetvalues");
sequence.appendChild(part11);
ninth.appendChild(sequence);
schema.appendChild(ninth);
Element tenth = doc.createElement("complexType");
tenth.setAttribute("name", "correlationsetvalues");
sequence = doc.createElement("sequence");
Element part12 = doc.createElement("element");
part12.setAttribute("name", "PurchaseOrderNumber");
part12.setAttribute("type", "xsd:string");
sequence.appendChild(part12);
Element part13 = doc.createElement("element");
part13.setAttribute("name", "customerID");
part13.setAttribute("type", "xsd:string");
sequence.appendChild(part13);
tenth.appendChild(sequence);
schema.appendChild(tenth);
// show the schema w3c element via conversion JDOM Element and coversion to string
org.jdom.input.DOMBuilder jdbuilder = new org.jdom.input.DOMBuilder();
org.jdom.Element jelement = jdbuilder.build(schema);
//System.out.println("\njelement " + jelement);
org.jdom.output.XMLOutputter xmloutput = new org.jdom.output.XMLOutputter();
xmloutput.setIndent(" ");
xmloutput.setNewlines(true);
xmloutput.setTrimAllWhite(true);
xmloutput.setTextTrim(true);
xmloutput.setEncoding("ISO-8859-1");
String strelement = xmloutput.outputString(jelement);
System.out.println("schema in jdom = \n " + strelement);
UnknownExtensibilityElement extel = new UnknownExtensibilityElement();
extel.setElement(schema);
extel.setElementType(new QName(Constants.Q_ELEM_XSD_2001.getNamespaceURI(),
schema.getLocalName()));
types.addExtensibilityElement(extel);
// the above is preferrable to this
//types.setDocumentationElement(schema);
//System.out.println("schema " + schema);
// and set the types definiton back to the definition object
definition.setTypes(types);
// these lines all show null or empty on system.out.println
//System.out.println("\ntypes " + types);
// end of setting the types
// add the messages*******************************************************
MessageImpl message1 = (MessageImpl)definition.createMessage();
QName messageqname= new QName("http://www.yoerg.net", "newMessage");
message1.setQName(messageqname);
PartImpl partma = (PartImpl)definition.createPart();
partma.setName("sendPurchaseOrderBody");
partma.setElementName(new QName("http://www.yoerg.net", "sendPurchaseOrder"));
message1.addPart(partma);
partma = (PartImpl)definition.createPart();
partma.setName("correlationsBody");
partma.setElementName(new QName("http://www.yoerg.net", "correlations"));
message1.addPart(partma);
partma = (PartImpl)definition.createPart();
partma.setName("portTypeBody");
partma.setElementName(new QName("http://www.yoerg.net", "portType"));
message1.addPart(partma);
partma = (PartImpl)definition.createPart();
partma.setName("partnerLinkBody");
partma.setElementName(new QName("http://www.yoerg.net", "partnerLink"));
message1.addPart(partma);
definition.addMessage(message1);
// create new blank message for response, with no parts
MessageImpl message2 = (MessageImpl)definition.createMessage();
QName messageqname2= new QName("http://www.yoerg.net", "sendPurchaseOrderResponseMessage");
message2.setQName(messageqname2);
definition.addMessage(message2);
System.out.println("\nmessage1 " + message1);
System.out.println("\nmessage2 " + message2);
//Map map = message.getParts();
//Element mes = message.getDocumentationElement();
//System.out.println("\nmessage map = " + map);
// done adding messages
// add the porttypes******************************************************
PortTypeImpl porttype = (PortTypeImpl)definition.createPortType();
porttype.setQName(new QName("http://www.yoerg.net", "purchaseOrderPortType"));
OperationImpl operation = (OperationImpl)definition.createOperation();
operation.setName("sendMyPurchaseOrder");
operation.setStyle(javax.wsdl.OperationType.REQUEST_RESPONSE);
InputImpl input = (InputImpl)definition.createInput();
input.setName("sendPurchaseOrderRequest");
input.setMessage(message1);
operation.setInput(input);
OutputImpl output = (OutputImpl)definition.createOutput();
output.setName("sendPurchaseOrderResponse");
output.setMessage(message2);
operation.setOutput(output);
porttype.addOperation(operation);
System.out.println("\nporttype " + porttype);
definition.addPortType(porttype);
// done adding the porttypes
// add the bindings*******************************************************
BindingImpl binding = (BindingImpl)definition.createBinding();
binding.setQName(new QName("http://www.yoerg.net",
"purchaseOrderSOAPBinding"));
binding.setPortType(porttype);
SOAPBindingImpl bindingextension = new SOAPBindingImpl();
bindingextension.setStyle("document");
bindingextension.setTransportURI("http://schemas.xmlsoap.org/soap/http");
//System.out.println("binding extension " + bindingextension);
binding.addExtensibilityElement(bindingextension);
BindingOperationImpl bindingoperation
= (BindingOperationImpl)definition.createBindingOperation();
bindingoperation.setName("sendMyPurchaseOrder");
bindingoperation.setOperation(operation);
// this is not present in the Imported correct version, and these lines of code
// are not necessary, but they also do not hurt or help
//SOAPOperationImpl operationextension = new SOAPOperationImpl();
//operationextension.setStyle("document");
//operationextension.setSoapActionURI("");
///////operationextension.setElementType(new QName("http://www.yoerg.net", "ListenerService"));
//operationextension.setRequired(new Boolean(true));
//bindingoperation.addExtensibilityElement(operationextension);
BindingInputImpl bindinginput
= (BindingInputImpl)definition.createBindingInput();
bindinginput.setName("sendPurchaseOrderRequest");
SOAPBodyImpl inputextension = new SOAPBodyImpl();
inputextension.setUse("literal");
inputextension.setRequired(new Boolean(true));
inputextension.setNamespaceURI("http://www.yoerg.net");
bindinginput.addExtensibilityElement(inputextension);
//System.out.println("\ninputextension " + inputextension);
bindingoperation.setBindingInput(bindinginput);
BindingOutputImpl bindingoutput
= (BindingOutputImpl)definition.createBindingOutput();
bindingoutput.setName("sendPurchaseOrderResponse");
SOAPBodyImpl outputextension = new SOAPBodyImpl();
outputextension.setUse("literal");
outputextension.setRequired(new Boolean(true));
outputextension.setNamespaceURI("http://www.yoerg.net");
bindingoutput.addExtensibilityElement(outputextension);
//System.out.println("\noutputextension " + outputextension);
bindingoperation.setBindingOutput(bindingoutput);
binding.addBindingOperation(bindingoperation);
System.out.println("\nbinding " + binding);
definition.addBinding(binding);
// done adding binding
// adding service*********************************************************
ServiceImpl service = (ServiceImpl)definition.createService();
service.setQName(new QName("http://www.yoerg.net",
"ListenerServiceService"));
PortImpl port = (PortImpl)definition.createPort();
port.setBinding(binding);
port.setName("ListenerService");
SOAPAddressImpl soapaddress = new SOAPAddressImpl();
soapaddress
.setLocationURI("http://localhost:8080/axis/services/ListenerService");
port.addExtensibilityElement(soapaddress);
service.addPort(port);
definition.addService(service);
System.out.println("\nService " + service);
// done adding service
// print def object, and you will see all objects, except types
System.out.println("\ndefinition \n" + definition);
// output to file, just like we would in bpel workflow environment
com.ibm.wsdl.xml.WSDLWriterImpl writer
= (com.ibm.wsdl.xml.WSDLWriterImpl)factory.newWSDLWriter();
File file = new File("c:\\chris\\w.wsdl");
FileOutputStream out = null;
// this has been proven to be correct
try{
out = new FileOutputStream(file);
writer.writeWSDL(definition, out);
catch(FileNotFoundException fnfe){
System.out.println("file not found " + fnfe.getMessage());
catch(IOException ioe){
System.out.println("file not found " + ioe.getMessage());
catch(javax.wsdl.WSDLException we){
System.out.println("wsdl exception " + we.getMessage());
// now bring it back in just for fun
FileInputStream in = null;
byte[] inputfile = null;
org.jdom.Document jdocument = null;
try{
in = new FileInputStream(file);
inputfile = new byte[in.available()];
in.read(inputfile, 0, in.available());
org.jdom.input.SAXBuilder jdombuilder = new org.jdom.input.SAXBuilder();
ByteArrayInputStream byteinput = new ByteArrayInputStream(inputfile);
jdocument = jdombuilder.build(byteinput);
catch(FileNotFoundException fnfe){
System.out.println("file not found " + fnfe.getMessage());
catch(org.jdom.JDOMException jde){
System.out.println("jdom exception " + jde.getMessage());
catch(IOException ioe){
System.out.println("io exception " + ioe.getMessage());
String strdocument = xmloutput.outputString(jdocument);
System.out.println("\nJDOM beautified version \n" + strdocument);
public static void main(String[] args){
WSDLFactory factory = new WSDLFactory();
factory.makeWorkflowWSDL();
End ofWSDLFactory.java*********************************************************************
Desired WSDL output to file******************************************************************
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="PurchaseOrderProcess" targetNamespace="http://www.yoerg.net"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:http-conf="http://schemas.iona.com/transports/http/configuration"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.yoerg.net" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<types>
<schema targetNamespace="http://www.yoerg.net"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<element name="sendPurchaseOrder" type="tns:sendPORequest"/>
<element name="correlations" type="tns:correlationset"/>
<element name="portType" type="xsd:string"/>
<element name="partnerLink" type="xsd:string"/>
<element name="sendSchedule" type="tns:sendScheduleRequest"/>
<element name="sendInvoice" type="tns:sendInvoiceRequest"/>
<complexType name="correlationsetvalues">
<sequence>
<element name="PurchaseOrderNumber" type="xsd:string"/>
<element name="customerID" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="correlationset">
<sequence>
<element name="PurchaseOrder" type="tns:correlationsetvalues"/>
</sequence>
</complexType>
<complexType name="sendPORequest">
<sequence>
<element name="customerId" type="xsd:long"/>
<element name="purchaseOrderNumber" type="xsd:long"/>
<element name="productId" type="xsd:long"/>
<element name="quantity" type="xsd:int"/>
</sequence>
</complexType>
<complexType name="sendScheduleRequest">
<sequence>
<element name="shipDate" type="xsd:dateTime"/>
<element name="customerId" type="xsd:long"/>
<element name="purchaseOrderNumber" type="xsd:long"/>
</sequence>
</complexType>
<complexType name="sendInvoiceRequest">
<sequence>
<element name="price" type="xsd:double"/>
<element name="customerId" type="xsd:long"/>
<element name="purchaseOrderNumber" type="xsd:long"/>
</sequence>
</complexType>
</schema>
</types>
<message name="newMessage">
<part element="tns:sendPurchaseOrder" name="sendPurchaseOrderBody"/>
<part element="tns:correlations" name="correlationsBody"/>
<part element="tns:portType" name="portTypeBody"/>
<part element="tns:partnerLink" name="partnerLinkBody"/>
</message>
<message name="sendPurchaseOrderResponseMessage"/>
<message name="sendScheduleRequestMessage">
<part element="tns:sendSchedule" name="sendScheduleBody"/>
<part element="tns:correlations" name="correlationBody"/>
<part element="tns:portType" name="portTypeBody"/>
<part element="tns:partnerLink" name="partnerLinkBody"/>
</message>
<message name="sendInvoiceRequestMessage">
<part element="tns:sendInvoice" name="sendInvoiceBody"/>
<part element="tns:correlations" name="correlationsBody"/>
<part element="tns:portType" name="portTypeBody"/>
<part element="tns:partnerLink" name="partnerLinkBody"/>
</message>
<portType name="purchaseOrderPortType">
<operation name="sendMyPurchaseOrder">
<input message="tns:newMessage" name="sendPurchaseOrderRequest"/>
<output message="tns:sendPurchaseOrderResponseMessage"
name="sendPurchaseOrderResponse"/>
</operation>
<operation name="sendMySchedule">
<input message="tns:sendScheduleRequestMessage" name="sendMySchedule"/>
</operation>
<operation name="sendInvoice">
<input message="tns:sendInvoiceRequestMessage" name="sendInvoice"/>
</operation>
</portType>
<binding name="purchaseOrderSOAPBinding" type="tns:purchaseOrderPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="sendMyPurchaseOrder">
<soap:operation soapAction="" style="document"/>
<input name="sendPurchaseOrderRequest">
<soap:body use="literal"/>
</input>
<output name="sendPurchaseOrderResponse">
<soap:body use="literal"/>
</output>
</operation>
<operation name="sendMySchedule">
<soap:operation soapAction="" style="document"/>
<input name="sendMySchedule">
<soap:body use="literal"/>
</input>
</operation>
<operation name="sendInvoice">
<soap:operation soapAction="" style="document"/>
<input name="sendInvoice">
<soap:body use="literal"/>
</input>
</operation>
</binding>
<service name="ListenerServiceService">
<port binding="tns:purchaseOrderSOAPBinding" name="ListenerService">
<soap:address location="http://localhost:8080/axis/services/ListenerService"/>
<http-conf:client/>
<http-conf:server/>
</port>
</service>
</definitions>
End of desired WSDL*************************************************************************************Adding these statements solved the problem
message1.setUndefined(false);
message2.setUndefined(false);
binding.setUndefined(false);
operation.setUndefined(false);
porttype.setUndefined(false);
This is kind of weird because you explicitly define them thru API calls, and this call seems redundant.
Chris Yoerg -
How do I create multiple types of child nodes in ADF Faces Tree Component
Hi,
I am trying to construct a tree using ADF Faces. The tree I am trying to develop should look something like:
- Departments
+ Dept 10
+ Dept 20
+ Dept 30
+ Dept 40
- Employees
+ SCOTT
+ALLEN
+ BLAKE
The nodes shown at the top level should serve as labels, indicating the various types of nodes available.
I have created the top level RootLabelsViewObj, with a SQL clause:
select rn, node_label
from (
select 1 rn
, 'Employees' node_label
from dual
union all
select 2 rn
, 'Departments' node_label
from dual
union all
select 3 rn
, 'Bonusplans' node_label
from dual
I have created ViewLinks between the RootLabelsViewObj and the DeptView and EmpView respectively (created on top of DEPT and EMP table in SCOTT schema), based on the LABEL attribute in the RootLabelsViewObj and with ViewLink SQL specified like:
:Bind_NodeLabel = 'Departments' for the link with DeptView and :Bind_NodeLabel = 'Employees' for the link with EmpView.
In the ADF BC Application Module Tester, I get exactly what I want.
However, when I create a JSF JSPX page and drag the RootLabelsViewObj from the Data Control Panel to the page as ADF Tree, I run into a little issue: it seems like I cannot create a second Branch Accessor rule for the RootLabelsViewObj1: I have created a first Branch Accessor Rule referring to DeptView and now try to create a second one for EmpView, to allow Employees to be displayed under the root label "Employees" - but I cannot.
The PageDefinition looks like:
<tree id="RootLabelsViewObj1" IterBinding="RootLabelsViewObj1Iterator">
<AttrNames>
<Item Value="Rn"/>
<Item Value="NodeLabel"/>
</AttrNames>
<nodeDefinition DefName="model.RootLabelsViewObj"
id="RootLabelsViewObjNode">
<AttrNames>
<Item Value="NodeLabel"/>
</AttrNames>
<Accessors>
<Item Value="DeptView"/>
</Accessors>
</nodeDefinition>
<nodeDefinition DefName="model.EmpView" id="EmpViewNode">
<AttrNames>
<Item Value="Ename"/>
</AttrNames>
</nodeDefinition>
<nodeDefinition DefName="model.DeptView" id="DeptViewNode">
<AttrNames>
<Item Value="Deptno"/>
</AttrNames>
</nodeDefinition>
</tree>
Does anyone know:
- whether it is possible (intended) to have more than one branch accessor per node (i.e. more than one type of child under a node in the tree)
- if so, how this can be achieved?
Right now it looks like I am limited to each node in the tree having only one type of child node.
Please tell me I am wrong.
best regards,
LucasGive this a shot mate
event.getNativeEventTarget();That will allow you to access the DOM object directly
Id can be retrieved via
event.getNativeEventTarget().id; -
Error parsing envelope: Header child element must be namespace qualified
Hey all,
I'm creating a BPEL process that invokes a web service. The web service has an authenticate method that returns a session ID that I attempt to invoke. However, the process fails when trying to parse the response when invoking that operation. I checked the server logs and it's reporting the following: javax.xml.soap.SOAPException: Error parsing envelope: most likely due to an invalid SOAP message.: Header child element 'ID' must be namespace qualified!
So I invoked the authenticate operation using SOAP UI, since it doesn't parse the response but merely displays it, and here's what was returned (slightly modified):
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<ID>xxx</ID>
</soapenv:Header>
<soapenv:Body>
<ns1:SessionID xmlns:ns1="http://some-namespace">
<ns1:ID>xxx</ns1:ID>
</ns1:SessionID>
</soapenv:Body>
</soapenv:Envelope>
Indeed the ID tag in the header doesn't have a namespace prefix. Looking at the SOAP 1.1 spec it says, “A header entry is identified by its fully qualified element name, which consists of the namespace URI and the local name. All immediate child elements of the SOAP Header element MUST be namespace-qualified.”
I was told that the code for the web service is frozen and cannot be changed. Are there any ways around this problem? Is it possible for the BPEL process to not parse the SOAP header?
Thanks,
BillAll,
I think I might use a HeaderHandler to either strip the offending element from the header all together or modify it so that it's namespace qualified. The problem is, I can't find much documentation on it. The only thing I can find is this: Manipulating XML Data in BPEL section 3.19. It says to implement the HeaderHandler interface but doesn't give the fully qualified name of the interface. I'm guessing it's referring to com.collaxa.cube.ws.HeaderHandler. The invoke method that is defined in the interface is a little different than the one in the documentation. Mine has a signature of public void invoke(CXPartnerLink partnerLink, String operationName, Map payload, List list, Map map2)...what do these parameters represent and what key/value types do the maps have? It also says to register the handler in the bpel.xml deployment descriptor file but I can't find one - is it auto-generated? If so, where is it. If not, how do I generate it? I appreciate any information.
Thanks,
Bill -
Header child element 'WSCorIDSOAPHeader' must be namespace qualified!
I have two machines. The first machine have an OSB managed server and admin server. The second machine have a SOA managed server, admin server and enterprise manager.
A service call in OSB is redirect do SOA Server (BPEL process).
After the route the follow message error show in SOA Server log.
INFO: FabricProviderServlet.stateChanged SOA Platform is running and accepting requests
javax.xml.soap.SOAPException: Error parsing envelope: most likely due to an invalid SOAP message.: Header child element 'WSCorIDSOAPHeader' must be namespace qualified!
at oracle.j2ee.ws.saaj.soap.AbstractSOAPImplementation.createEnvelope(AbstractSOAPImplementation.java:137)
at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:95)
at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:64)
at oracle.j2ee.ws.saaj.soap.MessageImpl.getSOAPBody(MessageImpl.java:1572)
at oracle.j2ee.ws.common.soap.SoapUtils.getSOAPBodyFirstChildQName(SoapUtils.java:249)
at oracle.j2ee.ws.server.mgmt.runtime.model.WebServiceOperationModelHelper.getOperationModelFromInputMessage(WebServiceOperationModelHelper.java:139)
at oracle.j2ee.ws.server.provider.ProviderPort.getOperationModelFromInputMessage(ProviderPort.java:986)
at oracle.j2ee.ws.server.mgmt.runtime.SuperServerInterceptorPipeline.handleRequest(SuperServerInterceptorPipeline.java:132)
at oracle.j2ee.ws.server.provider.management.AbstractProviderInterceptorPipeline.executeRequestInterceptorChain(AbstractProviderInterceptorPipeline.java:563)
at oracle.j2ee.ws.server.provider.ProviderProcessor.executeInterceptorRequestChain(ProviderProcessor.java:921)
at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:231)
at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:193)
at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:459)
at oracle.integration.platform.blocks.soap.FabricProviderServlet.doPost(FabricProviderServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
Caused By: javax.xml.soap.SOAPException: Header child element 'WSCorIDSOAPHeader' must be namespace qualified!
at oracle.j2ee.ws.saaj.soap.HeaderImpl.createChildElement(HeaderImpl.java:213)
at oracle.j2ee.ws.saaj.soap.ElementImpl.createAndAppendChildElement(ElementImpl.java:827)
at oracle.j2ee.ws.saaj.soap.StaxHandler.startElement(StaxHandler.java:222)
at oracle.j2ee.ws.saaj.soap.StaxHandler.staxParse(StaxHandler.java:82)
at oracle.j2ee.ws.saaj.soap.StaxHandler.staxParse(StaxHandler.java:70)
at oracle.j2ee.ws.saaj.soap.AbstractSOAPImplementation.getStaXParsedEnvelope(AbstractSOAPImplementation.java:204)
at oracle.j2ee.ws.saaj.soap.AbstractSOAPImplementation.createEnvelope(AbstractSOAPImplementation.java:58)
at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:95)
at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:64)
at oracle.j2ee.ws.saaj.soap.MessageImpl.getSOAPBody(MessageImpl.java:1572)
at oracle.j2ee.ws.common.soap.SoapUtils.getSOAPBodyFirstChildQName(SoapUtils.java:249)
at oracle.j2ee.ws.server.mgmt.runtime.model.WebServiceOperationModelHelper.getOperationModelFromInputMessage(WebServiceOperationModelHelper.java:139)
at oracle.j2ee.ws.server.provider.ProviderPort.getOperationModelFromInputMessage(ProviderPort.java:986)
at oracle.j2ee.ws.server.mgmt.runtime.SuperServerInterceptorPipeline.handleRequest(SuperServerInterceptorPipeline.java:132)
at oracle.j2ee.ws.server.provider.management.AbstractProviderInterceptorPipeline.executeRequestInterceptorChain(AbstractProviderInterceptorPipeline.java:563)
at oracle.j2ee.ws.server.provider.ProviderProcessor.executeInterceptorRequestChain(ProviderProcessor.java:921)
at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:231)
at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:193)
at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:459)
at oracle.integration.platform.blocks.soap.FabricProviderServlet.doPost(FabricProviderServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
>
What is WSCorIDSOAPHeader ???Remove Introscope agend configuration temporarily from yours managed servers and try call the service.
This is the cause of your problem.
Contact your Introscope Administration and task about the problem of Introscope + OSB + BPEL (SOA Server).
Workaround:
Remove Introscope agend configuration temporarily from yours managed servers and try call the service. -
ERROR - The element 'MailboxSearchScope' in namespace has invalid child element 'ExtendedAttributes'
hi everyone,
i'm using exchange server 2013 and write following code for getting searchable mailboxes and getting emails from these searchable mailboxes but i'm getting following error on "SearchMailboxes" function.
Code:
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013);
service.Credentials = new WebCredentials("[email protected]", "test123");
service.AutodiscoverUrl("[email protected]", RedirectionUrlValidationCallback);
GetSearchableMailboxesResponse gsMBResponse = service.GetSearchableMailboxes("example*", false);
MailboxSearchScope[] msbScope1 = new MailboxSearchScope[gsMBResponse.SearchableMailboxes.Length];
Int32 mbCount1 = 0;
foreach (SearchableMailbox sbMailbox in gsMBResponse.SearchableMailboxes)
msbScope1[mbCount1] = new MailboxSearchScope(sbMailbox.ReferenceId, MailboxSearchLocation.PrimaryOnly);
mbCount1++;
SearchMailboxesParameters smSearchMailbox1 = new SearchMailboxesParameters();
MailboxQuery mbq1 = new MailboxQuery("attachment:'.xls'", msbScope1);
MailboxQuery[] mbqa1 = new MailboxQuery[1] { mbq1 };
smSearchMailbox1.SearchQueries = mbqa1;
smSearchMailbox1.PageSize = 1000;
smSearchMailbox1.ResultType = Microsoft.Exchange.WebServices.Data.SearchResultType.PreviewOnly;
service.TraceEnabled = true;
ServiceResponseCollection<SearchMailboxesResponse> srCol1 = service.SearchMailboxes(smSearchMailbox1);
ERROR:
The request failed schema validation: The element 'MailboxSearchScope' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types' has invalid child element 'ExtendedAttributes' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types'."}
anyone have idea to solve this?
ThanksCheck to make sure you have the latest version of the managed API.
https://github.com/OfficeDev/ews-managed-api/ -
Hiii...
I was doing FacebookIntegration App.Trying it from many dayss...Can anybody please help me with the below error.It was raising in FacebookLoginPage....
A first chance exception of type 'System.IO.FileLoadException' occurred in Unknown Module.
My code is
namespace tori.Pages
public partial class FacebookLoginPage : PhoneApplicationPage
public FacebookLoginPage()
InitializeComponent();
this.Loaded += FacebookLoginPage_Loaded;
async void FacebookLoginPage_Loaded(object sender, RoutedEventArgs e)
if (!App.isAuthenticated)
App.isAuthenticated = true;
await Authenticate();
private FacebookSession session;
private async Task Authenticate()
string message = String.Empty;
try
session = await App.FacebookSessionClient.LoginAsync("user_about_me,read_stream,publish_stream,publish_actions");
App.AccessToken = session.AccessToken;
App.FacebookId = session.FacebookId;
Dispatcher.BeginInvoke(() => NavigationService.Navigate(new Uri("/Pages/LandingPage.xaml", UriKind.Relative)));
catch (InvalidOperationException e)
message = "Login failed! Exception details: " + e.Message;
MessageBox.Show(message);
While I was debugging error was raising in this line
App.FacebookSessionClient.LoginAsync("user_about_me,read_stream,publish_stream,publish_actions");
While running the App in device I was getting the above error.
And while running the app in emulator I was facing the below error
A first chance exception of type 'System.TypeLoadException' occurred in System.Windows.dll
Additional information: File or assembly name 'System.Threading.Tasks, Version=1.5.10.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A', or one of its dependencies, was not found.
I am unable to understand what to solve and which is the reason also.
Can anybody please help me in rectifying it...
Many Thanks in advance..Hi venukoti,
Are you using Facebook SDK for helping with feature implementation?
Looks like your app does not have dependencies installed. Please try to re-install the Facebook SDK to see if the same thing happens.
I would recommend you ask Facebook:
http://facebooksdk.net/docs/windows/ also
https://developers.facebook.com/tools-and-support/ for more sufficient suggestions.
Thanks for your understanding.
--James
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Hi,
I was running Shoutcast.Sample.Phone.Background in windows phone 8 device.I have got this example from codeplex http://shoutcastmss.codeplex.com/workitem/826.
I have used the code present in above and started running the app.But the stream was not playing continuosly in Background.
It was stopping rising the below exception
A first chance exception of type 'System.InvalidOperationException' occurred in Silverlight.Media.Phone.DLL.
An exception of type 'System.InvalidOperationException' occurred in Silverlight.Media.Phone.DLL but was not handled in user code.
Can anybody please help me how can I overcome this exception.And play stream continuosly in background until I stop it.
ManyThanks in advance..You should ask in the discussion for that code sample.
Matt Small - Microsoft Escalation Engineer - Forum Moderator
If my reply answers your question, please mark this post as answered.
NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
objects and unknown namespaces. -
First create the valuation-type-independent data in LSMW for MM
Hello All,
I have uploaded MM FHMI using LSMW except accounting view.
I am trying to upload Accounting view separately and got an error "First create the valuation-type-independent data"
I am using Tcode= MM01.
What to do now?
Regards,
Jyothishree C PHi all,
I'm using BAPI_MATERIAL_SAVEDATA for opening all views of material. I I try to open COST and ACCOUNT views, still having same message error "First create the valuation-type-independent data".
Also If I don't open ACCOUNT and COST views, the creation works fine. After in updating material, I set up the VALUATIONDATA / X structure but the error is the same.
We use "split valuation on material" and the Valuation Type is a mandatory field.
Any help?
Thanks in advance.
GB -
Error:First create the valuation-type-independent data:BAPI MM
Hello all,
I am getting above error (First create the valuation-type-independent data) when i sent the BWTAR field to BAPI_MATERIAL_GET_ALL and material data is not getting fetched.
Please guide to resolve the issue.
Thank you.
Edited by: sanjivrd on Nov 30, 2009 10:08 AMHi all,
I'm using BAPI_MATERIAL_SAVEDATA for opening all views of material. I I try to open COST and ACCOUNT views, still having same message error "First create the valuation-type-independent data".
Also If I don't open ACCOUNT and COST views, the creation works fine. After in updating material, I set up the VALUATIONDATA / X structure but the error is the same.
We use "split valuation on material" and the Valuation Type is a mandatory field.
Any help?
Thanks in advance.
GB -
Good Morning Everyone,
I want to thank you for reading my problem and see if you can help me. The deadline for this project is monday and I am struggling to make it work. I am using axis 1.4 .
I created the web method
public void GetFilters( javax.xml.rpc.holders.BooleanHolder GetFiltersResult, CCRFiltersHolder CCRFilters,
javax.xml.rpc.holders.StringHolder Message, javax.xml.rpc.holders.StringHolder XMLData ){
First, I needed to create the CCRFilters as a CCRFiltersHolder because is an IN/OUT parameter.
public class CCRFiltersHolder implements javax.xml.rpc.holders.Holder{
public CCRFiltersList value;
public CCRFiltersHolder() {
public CCRFiltersHolder(CCRFiltersList value) {
this.value = value;
public class CCRFiltersList implements Serializable{
private CCRFilters[] filterList;
public CCRFilters[] getFilterList() {
return filterList;
public void setFilterList(CCRFilters[] filterList) {
this.filterList = filterList;
public CCRFilters getFilterList(int index) {
return filterList[index];
public void setFilterList(int index, CCRFilters filterList) {
this.filterList[index] = filterList;
public class CCRFilters implements Serializable {
private String FieldName;
private String RelationShip;
public String getFieldName() {
return FieldName;
public void setFieldName(String pFieldName) {
FieldName = pFieldName;
public String getRelationShip() {
return RelationShip;
public void setRelationShip(String pRelationShip) {
RelationShip = pRelationShip;
My wsdd file looks like:
<service name="CCR" provider="java:RPC" style="wrapped" use="literal" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<parameter name="className" value="com.harris.mercury.gemsccrintegration.CCR"/>
<parameter name="allowedMethods" value="*"/>
<parameter name="typeMappingVersion" value="1.2"/>
<namespace>http://tempuri.org/</namespace>
<parameter name="schemaUnqualified" value="http://www.gemsgov.com/CCR/"/>
<parameter name="wsdlServicePort" value="CCRPort"/>
<operation name="GetFilters" soapAction="http://www.gemsgov.com/CCR/GetFilters" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<parameter name="GetFiltersResult" type="xs:boolean" mode="OUT"/>
<parameter name="CCRFilters" mode="INOUT" type="rtns:CCRFiltersHolder" xmlns:rtns="http:////www.gemsgov.com/CCR/GetFilters"/>
<parameter name="Message" type="xs:string" mode="INOUT"/>
<parameter name="XMLData" type="xs:string" mode="INOUT"/>
</operation>
<typeMapping
xmlns:ns="http://www.gemsgov.com/CCR/GetFilters" qname="ns:CCRFiltersHolder"
type="java:com.harris.mercury.cashiering.gemsintegration.holder.CCRFiltersHolder"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns1="http://www.gemsgov.com/CCR/GetFilters" qname="ns1:CCRFiltersList"
type="java:com.harris.mercury.cashiering.gemsintegration.CCRFiltersList"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns2="http://www.gemsgov.com/CCR/GetFilters"
qname="ns2:CCRFilters"
type="java:com.harris.mercury.cashiering.gemsintegration.CCRFilters"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle=""
/>
<typeMapping xmlns:soapenc="http://www.gemsgov.com/CCR/GetFilters"
qname="soapenc:CCRFiltersArray"
type="java:com.harris.mercury.cashiering.gemsintegration.CCRFilters[]"
serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"
encodingStyle=""
/>
</service>
Even in my test program, I added the following code :
Call call = (Call) service.createCall();
QName qn = new QName( "http://www.gemsgov.com/CCR/GetFilters", "CCRFiltersHolder" );
call.registerTypeMapping("com.harris.mercury.cashiering.gemsintegration.holder.CCRFiltersHolder".getClass(), qn,
BeanSerializerFactory.class, BeanDeserializerFactory.class);
QName qn4 = new QName( "http://www.gemsgov.com/CCR/GetFilters", "CCRFiltersList" );
call.registerTypeMapping(CCRFiltersList.class, qn4,BeanSerializerFactory.class, BeanDeserializerFactory.class);
QName qn1 = new QName( "http://www.gemsgov.com/CCR/GetFilters", "CCRFilters" );
call.registerTypeMapping(CCRFilters.class, qn1, BeanSerializerFactory.class, BeanDeserializerFactory.class);
QName qn3 = new QName( "http://schemas.xmlsoap.org/soap/encoding", "CCRFiltersArray" );
call.registerTypeMapping(CCRFilters[].class, qn3, new ArraySerializerFactory(), new ArrayDeserializerFactory());
But when running, everytime I get the following message : SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
Please any help whould be appreciate it.
Thanks a lot,
Martha
Edited by: Melliza on Sep 25, 2009 10:00 AMHi,
Regarding to the query which I have posted may have following possibility.
This error may be due to the arguments which it gives as the output, as some of those arguments are the object of some other class.
As the web service which I am trying to access is developed in .Net and requires three parameters, out of which one parameter named as "name" is input parameter while the other two are the output parameters, which web service provide as output. And may be the output which it provides may also be developed in .Net only and thats why while passing the input variable, it is not able to convert its output variable into the String.
Please provide your valuable comments and solution to that.
Thanks -
Com.bea.xml.XmlException error for "could not create child element"
In Workshop 9.2, after I created a project with XMLBeans Builder Builder against the xsd's and created a web service control against a wsdl, I inserted the control in a client project for consumption. However, when calling into a method of the control, I got a com.bea.xml.XmlException, saying "could not create child element" for an object parameter passed in the call to the method. The relevant info in the server console looks like this:
Caused by: com.bea.xml.XmlException: could not create child element 'wirelessPhoneNumber' for Wrapped XMLBean operation on '<?xml version="1.0" encoding="UTF-8
"?><m:sendSMSMessage xmlns:m="http://service.xyz.com/provider/mobile/abc/sendSMSMessage/200701/"><ns:behaviorVersion xmlns:ns="http://service.xyz.com/entity/message/2003/">0</ns:behaviorVersion><ns:custNbr xmlns:ns="http
://service.xyz.com/entity/party/2003/">Hello</ns:custNbr></m:sendSMSMessage>'
Does any have an idea what this is trying to tell me?
Thanks in advance for any help,
JasonLooking into it further, I think it's the parameter wirelessPhoneNumber, which is a complex type from xsd and a java object passed to the call sendSMSMessage, that is having a namespace problem, or other problem.
This parameter object was from XMLBeans java binding. I created and set it up like this before passing it to the call:
PhoneNumberType phoneNumberType = phoneNumberType.Factory.newInstance();
phoneNumberType.setFormat(PhoneNumberFormatEnum.FREEFORM);
phoneNumberType.setFullNumber(phoneNumber);
Obviously, com.bea.xbeanmarshal.buildtime.internal.util.XmlBeanUtil.createWrappedXBeanTopElement of XmlBeanUtil.java had a problem creating a wrapper element for it.
Any clue from anyone?
Jason -
Hi All,
I created a following program using "GetReportDefintion" method provided by BI Publisher Web Services
package bip_webservices;
import com.oracle.xmlns.oxp.service.PublicReportService.ItemData;
import com.oracle.xmlns.oxp.service.PublicReportService.ReportRequest;
import com.oracle.xmlns.oxp.service.PublicReportService.ReportResponse;
import com.oracle.xmlns.oxp.service.PublicReportService.ParamNameValue;
import com.oracle.xmlns.oxp.service.PublicReportService.ReportDefinition;
import com.oracle.xmlns.oxp.service.PublicReportService.ScheduleRequest;
import com.oracle.xmlns.oxp.service.PublicReportService.DeliveryRequest;
import com.oracle.xmlns.oxp.service.PublicReportService.EMailDeliveryOption;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.net.MalformedURLException;
import java.rmi.RemoteException;
import java.util.Calendar;
import javax.xml.rpc.ServiceException;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import org.apache.axis.encoding.ser.BeanDeserializerFactory;
import org.apache.axis.encoding.ser.BeanSerializerFactory;
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
import java.net.URL;
public class BIP_GetReportDefinition {
public static void main(String[] args) throws ServiceException, MalformedURLException, RemoteException{
try{
final String bipEndpoint = "http://localhost:9704/xmlpserver/services/PublicReportService?wsdl";
final String bipNamespace = "http://xmlns.oracle.com/oxp/service/PublicReportService";
final String xdofile = "/MyReports/SummaryCustomerReport/SummaryCustomerReport.xdo";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(new URL(bipEndpoint));
System.out.println("BEGIN TESTING getReportDefinition");
// register the ReportDefinition class
QName reportDef = new QName(bipNamespace, "ReportDefinition");
call.registerTypeMapping(ReportDefinition.class, reportDef,
BeanSerializerFactory.class, BeanDeserializerFactory.class);
// register the ParamNameValue class
QName nmvals = new QName(bipNamespace, "ParamNameValue");
call.registerTypeMapping(ParamNameValue.class, nmvals, BeanSerializerFactory.class, BeanDeserializerFactory.class);
call.setOperationName(new QName(bipNamespace, "getReportDefinition"));
call.addParameter("reportAbsolutePath", XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter("userID", XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter("password", XMLType.XSD_STRING, ParameterMode.IN);
call.setReturnClass(ReportDefinition.class);
// issue the request
ReportDefinition reportDefn = (ReportDefinition) call.invoke(
new Object[] { xdofile, "Administrator", "Administrator"});
System.out.println("Report Definition Returns with \n Default Output Format = " + reportDefn.getDefaultOutputFormat());
ParamNameValue params [] = reportDefn.getReportParameterNameValues();
if (params != null) {
for (int i = 0; i < params.length; i++) {
System.out.print("Parameter " + params.getName() + ":");
if (params[i].getValues() != null) {
for (int j = 0; j < params[i].getValues().length; j++)
System.out.print(" " + params[i].getValues()[j]);
} else
System.out.print(" null");
System.out.println(" - multiple values? " + params[i].isMultiValuesAllowed());
System.out.println("END TESTING getReportDefinition");
}catch(Exception e){
e.printStackTrace();
I am getting following exception message. Anyone has any ideas what could be the mistake ?
SEVERE: Exception:
org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:145)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.client.Call.invoke(Call.java:2467)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at bip_webservices.BIP_GetReportDefinition.main(BIP_GetReportDefinition.java:67)
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:145)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.client.Call.invoke(Call.java:2467)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at bip_webservices.BIP_GetReportDefinition.main(BIP_GetReportDefinition.java:67)
{http://xml.apache.org/axis/}hostname:mildh0228
org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.client.Call.invoke(Call.java:2470)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at bip_webservices.BIP_GetReportDefinition.main(BIP_GetReportDefinition.java:67)
Caused by: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:145)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.client.Call.invoke(Call.java:2467)
... 3 moreThanks for giving this problem a look.
-SookieHi Sookie,
I found the problem is with couple of child parameters are not registered the deserializer. There're couple of additional classes needs to be registerd.
// register the TemplateLabelValue class
QName templateval = new QName(bipNamespace, "TemplateFormatLabelValue");
Class cls = TemplateFormatLabelValue.class;
call.registerTypeMapping(cls, templateval, BeanSerializerFactory.class, BeanDeserializerFactory.class);
// register the TemplateLabelValues class
QName templatevals = new QName(bipNamespace, "TemplateFormatsLabelValues");
cls = TemplateFormatsLabelValues.class;
call.registerTypeMapping(cls, templatevals, BeanSerializerFactory.class, BeanDeserializerFactory.class);
Could you please give it a try?
Thanks.
Yang -
ADF Faces showDetailItem seems to "load" child elements twice on tab select
Problem Summary:
Child elements of showDetailItem are being loaded/executed twice. The parent of the showDetailItem is a showOneTab, and the child of showDetailItem is an af:objectImage, which calls a servlet I have written that outputs an image.
The problem I am having is that when I click on a tab (showDetailItem) my servlet is called twice. It is as if the af:objectImage line of my JSP is executed twice.
I have proven this with breakpoints in the servlet and printing a message to the console. The doGet() method of my servlet is called twice. Using breakpoints in the JSP I see the JSP is executed/read only once.
Details:
I am requesting help with this problem as I cannot solve it one my own. I have tried the following, but have had no success.
1. Searched the web for a similar problem.
2. Searched this forum for a similar problem.
3. Consulted the ADF Developer Guide version 10.1.3.0
4. Upgraded my version of JDeveloper to 10.1.3.2.0, which has ADF Faces (oracle.faces.dt) version 10.1.3.40.66.
5. Debugging with print statements and stepping through JSP and servlet code.
6. Created the simplest JSP possible that I could still produce the problem with.
The Scenario:
My goal is to use the ADF Faces showOneTab and showDetailItem tags to create two tabbed panels that will contain a blank tab (tab one) and an image (on tab 2).
I have written a servlet, BrowserImage, which takes and ID as a parameter retrieves a BLOB from view object and then outputs a jpeg image to the browser. This is done by using the af:objectImage tag and specifying my servlet in the source parameter. The image is displayed fine, but I don't want the servlet to be called twice for performance reasons.
Here is the simplest JSP that contains the problem.
Note: I tried to simplify even more by calling the servlet in different ways (jsp:include etc..), but was unable to produce the problem. I think it is key that I call the servlet using an ADF Faces tag (af:objectImage).
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://xmlns.oracle.com/adf/faces/html" prefix="afh"%>
<%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
<%@ page import="javax.faces.context.FacesContext"%>
<%@ page import="javax.faces.el.ValueBinding"%>
<%@ page import="oracle.adf.model.BindingContext"%>
<%@ page import="oracle.adf.model.binding.DCDataControl"%>
<%@ page import="oracle.jbo.ApplicationModule"%>
<%! FacesContext fc = FacesContext.getCurrentInstance(); %>
<%! ValueBinding vb = fc.getApplication().createValueBinding("#{data}"); %>
<%! BindingContext bc = (BindingContext)vb.getValue(fc); %>
<%! DCDataControl dc = bc.findDataControl("AdSearchAppModuleDataControl"); %>
<%! ApplicationModule am = (ApplicationModule)dc.getDataProvider();%>
<% session.setAttribute("theAm", am); %>
<f:view>
<afh:html>
<afh:head title="showOneTest">
<meta http-equiv="Content-Type"
content="text/html; charset=windows-1252"/>
</afh:head>
<afh:body>
<af:form>
<af:showOneTab position="above">
<af:showDetailItem text="showDetailItem 1">
</af:showDetailItem>
<af:showDetailItem text="showDetailItem 2">
<af:objectImage source="/BrowserImage?imgId=1"/>
</af:showDetailItem>
</af:showOneTab>
</af:form>
</afh:body>
</afh:html>
</f:view>Note: The Java Script code included in the JSP is used to get an application module instance and pass it to my servlet in the session scope, so my servlet can access a view object, which contains the BLOB to output. I thought I should explain this as it may look confusing.
Any help would be appreciated.
Thanks,
MarkI don't think adding a flag to my servlet will work. I left out some details in the original posting that will likely make the flag solution unusable.
It is true that when I click on a tab that my servlet is called twice. My main goal is to ensure that the BrowserImage servlet only called when truly needed. The part I left out of the original posting is that if I click on a tab for the first time I can see my messages in the console indicating it was called twice.
. BrowserImage severlet called (doGet)
. BrowserImage servlet called (doGet)
The key is if I click on the tab again I only see the message appear once.
. BrowserImage severlet called (doGet)
At first I thought this was the correct behavior, but I now feel this is wrong as I think the image is being cached locally on the client browser by ADF Faces, so the first call to BrowserImage is not made, but for some reason on the second "load" of the panel the BrowserImage servlet is called.
To summarize the new details, I still think the showDetailItem is "loading" twice, but BrowserImage is only being called once, because the first loading used a locally cached image. This is my best guess, I did not prove this 100%. I did prove that the image is shown on the page before my servlet outputs it this made me start thinking about the client cache. Also I think it is an ADF Faces specific cache because if I use the "img" tag I don't think caching is used and the image is output by the call to my servlet. I don't want to use img for two reasons, 1 I would d like to use the client cache, 2 the img tag will not stay inside the showDetailItem, showDetail Item needs af: components as children it seems.
So the reason I feel this problem can't be solved with a flag is because I think the image will be cached on the client side and if the showDetailItem is loaded twice it seems my servlet is called once, but it was not required to be called to render the image. I can't use the concept of checking for the servlet being called by the same session in very quick succession, because the real problem I am trying to solve is the servlet should not be called at all, if the client cache had been used.
Perhaps there is a way for my servlet to determine if the client cache was used, but I have no idea how.
I should also point out I am displaying images in a table instead of a showOneTab using the same servlet and technique and the client cache is always used correctly, the BrowserImage is only called if the image is not cached on the client. This is why I think this is a showOneTab problem.
Sorry for leaving out these details, but I did not want to confuse the original posting with too much info. I figured if the tab was only loaded once, the cached image would be used and all would be good.
Again if you can provide more help I really appreciate it.
Maybe you are looking for
-
Problem with NFS in sender file adapter
Hi everybody, I´m facing the following problem. The XI runs under a HP-UNIX server and I want to access into a windows server by using NFS in the file sender adapter. I have created a shared folder in the windows server. In the Source Directory field
-
hi How do i check if there are any messages in the Queue/topic. i am using Platform edition Thanks
-
I am using an apple ipad 2, have always used facebook on it since I purchased it. now, tryig to open facebook, I receive only a white blank page. the only thing is that at the very top, it shows ' ipad with wifi running middle -- time and at the r
-
Javascript access to submit in TileView
Here is a working example of doing a submit on a javascript action in the ViewBean page: document.RequestListPage.action='../main/RequestListPage?RequestListPage.hiddenButton=&jato.pageSession=' document.RequestListPage.submit(); What would the code
-
How do i backup from iCloud (not the last)
i have a new device and when i tried to backup from icloud i couldn't find the last backup. the newest backup was blank when i plug the new device in, and i need the backup i did yesterday. where can i find it?