You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsif-user@ws.apache.org by "ALI,HANEEF (HP-Cupertino,ex1)" <ha...@hp.com> on 2003/04/09 02:06:45 UTC

Calrification of Parts

Can some one clarify what should be the name of the param in
WSIFMessage.setObjectPart(name, value)

In some of the examples
	name = part name of wsdl
	
in some other 
	name = element name in the schema

Some section of the code actually expects "part name" . But again this
differs based on wrapped/unwrapped.

Can some one please clarify what is wrapped/unwrapped/messaging? The
documentation in axis site doesn't explain it.?

Looks like based on the way you write the schema in wsdl for
document/literal it falls in any one of the category.

Haneef


-----Original Message-----
From: Anthony Elder [mailto:ant.elder@uk.ibm.com] 
Sent: Tuesday, April 08, 2003 9:06 AM
To: wsif-user@ws.apache.org
Subject: Re: Clarification on some of the code in wsif



WSIF is interpreting your WSDL as being wrapped document literal style. The
code you point to is trying to unwrapped the top level element to get at the
wrapped elements with in. One of the rules of being wrapped style is if the
input element is the name of the operation and the output element is the
name of the operation appended with "Response", which is why you see that
happening.

Is your WSDL using wrapped style?

I expect not if your output element is

<s:element name="GetOwnerResponse" nillable="false" type="s:string" />

To be wrapped that  would need to be something like:

<s:element name="GetOwnerResponse">
 <s:complexType>
  <s:sequence>
   <s:element minOccurs="1" maxOccurs="1" name="GetOwnerResult" nillable=
"false" type="s:string" />
  </s:sequence>
 </s:complexType>
</s:element>

Could you post your complete WSDL so I can see if this is a problem in WSIF
deciding its wrapped style WSDL incorrectly.

       ...ant

Anthony Elder
ant.elder@uk.ibm.com
Web Services Development
IBM UK Laboratories,  Hursley Park
(+44) 01962 818320, x248320, MP208.


"ALI,HANEEF (HP-Cupertino,ex1)" <ha...@hp.com> on 08/04/2003 01:17:32

Please respond to wsif-user@ws.apache.org

To:    "'wsif-user@ws.apache.org'" <ws...@ws.apache.org>
cc:
Subject:    Clarification on some of the code in wsif



Hi,

My service is document literal and Iam trying to invoke it dynamically using
WSIF. Iam getting an Exception "Cannot get complex type from elementType". I
traced the code and Iam not able to understand some section of the code

    private void unwrapSOAPParts() throws WSIFException {
   ....
   ....
   if (outputSOAPParts.size() == 1) {
    String s = operationName + "Response";
    Part p = (Part)outputSOAPParts.get(0);
    QName elementName = p.getElementName();
    if (elementName != null &&
s.equals(elementName.getLocalPart())) {
       this.outputUnwrappedSOAPParts =
          ProviderUtils.unWrapPart(p,
getDefinition(), context);
    }
   }

 }

 1) First I don't understand why are you appending the string "Response" to
the operationName. In mycase the operationName is "OperationName+Response"
so it is not a problem

2)  My response part is defined as
       <s:element name="GetOwnerResponse" nillable="false" type="s:string"
/>
  In the function
   public static List unWrapPart(Part p, Definition
def, WSIFMessage context) throws WSIFException {}

   which is called from unwrapSOAPParts() it throws the exception  in the
followign code segment
**************************
List children = et.getChildren();
     ComplexType ct = null;
     if (children == null || children.size() < 1) {
            ct = getComplexType(l, et.getElementType() );
     } else {
         ct = (ComplexType) children.get(0);
     }
        if (ct == null) {
         throw new WSIFException("cannot find complex type from
ElementType: " + et);
        }
*******************************************
  Obviously the above schema defintion doesn't have any compex part. Iam not
sure why the code is trying to find complext part  of all elements


3) Also my wsdl uses some schema which imports other schema. Is it possible
to make WSIF to override the schamaLocation value and use some user defined
value. In my case scheamLocation refers to
"http://schemas.xmlsoap.org/soap/envelope/" which always timesout. I have
saved the above scheam in my hard drvie. Is it possible to make wsif to
ingore the schemalocation for certain "URI" and use the userdefined value
instead.

regards,
Haneef