Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » How to validate a reference of a porttype in another wsdl file
How to validate a reference of a porttype in another wsdl file [message #499784] Tue, 24 November 2009 01:14 Go to next message
Eclipse UserFriend
Hi all,

I have added a extension for org.eclipse.wst.wsdl.validation.wsdl11validator extend point to validate a bpel partnerlink type in wsdl file.
For now I can validate the error if the reference porttype of partnerlinktype is different from the porttype in a same wsdl file, for example, a.wsdl.
But when the partnerlink type is in another wsdl file, b.wsdl.
b.wsdl import a.wsdl. I can not validate it because the porttype is not in the b.wsdl. I know I can resolve the import element to load the a.wsdl to validate it.
But I want to know if there is a way to do it easier? or can I call some methods to do this?

Thanks
Grid
Re: How to validate a reference of a porttype in another wsdl file [message #500002 is a reply to message #499784] Tue, 24 November 2009 11:46 Go to previous messageGo to next message
Eclipse UserFriend
Grid,

When your validator gets called, the list parameter of
org.eclipse.wst.wsdl.validation.internal.wsdl11.soap.SOAPVal idator.validate(Object,
List, IWSDL11ValidationInfo) contains a list with all the parents of the
WSDL element being validated. In that list you should find the parent
Definition object and from that you should be able to get the Import objects
pointing to already loaded imported Definition objects. You can thus find
all the imported objects you're interested in (port types). In JWSDL
1.1/WSDL4J 1.5 there is no one method on the Definition object to compute
this list for you; such a method getAllPortTypes() is only available in
JWSDL 1.2/WSDL4J 1.6, but WTP has not yet adopted this and there are no
plans to do so in the near future.

Hope this helps, Valentin

"grid.qian" <grid.qian@gmail.com> wrote in message
news:heftkl$7fu$1@build.eclipse.org...
> Hi all,
>
> I have added a extension for
> org.eclipse.wst.wsdl.validation.wsdl11validator extend point to validate a
> bpel partnerlink type in wsdl file. For now I can validate the error if
> the reference porttype of partnerlinktype is different from the porttype
> in a same wsdl file, for example, a.wsdl.
> But when the partnerlink type is in another wsdl file, b.wsdl. b.wsdl
> import a.wsdl. I can not validate it because the porttype is not in the
> b.wsdl. I know I can resolve the import element to load the a.wsdl to
> validate it. But I want to know if there is a way to do it easier? or can
> I call some methods to do this?
>
> Thanks
> Grid
Re: How to validate a reference of a porttype in another wsdl file [message #500164 is a reply to message #500002] Wed, 25 November 2009 03:55 Go to previous messageGo to next message
Eclipse UserFriend
Valentin,

Thank you for you comment.
But there is a problem. Based on your patch for https://bugs.eclipse.org/bugs/show_bug.cgi?id=295348,
you add the line to fix this issue:
validateExtensibilityElementList(parents,
((Definition)element).getExtensibilityElements(), valInfo);
In the WSDL11BasicValidator.validate(), the parents is empty.
So you need add the definition the parents list firstly, then pass it to
the validateExtensibilityElementList().

Grid
Re: How to validate a reference of a porttype in another wsdl file [message #500234 is a reply to message #500164] Wed, 25 November 2009 08:11 Go to previous message
Eclipse UserFriend
Grid, you are right, I'll fix this shortly.
Valentin

"grid.qian" <grid.qian@gmail.com> wrote in message
news:heirel$5dq$1@build.eclipse.org...
> Valentin,
>
> Thank you for you comment.
> But there is a problem. Based on your patch for
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=295348,
> you add the line to fix this issue:
> validateExtensibilityElementList(parents,
> ((Definition)element).getExtensibilityElements(), valInfo);
> In the WSDL11BasicValidator.validate(), the parents is empty.
> So you need add the definition the parents list firstly, then pass it to
> the validateExtensibilityElementList().
>
> Grid
Previous Topic:JS Code completion does not work
Next Topic:how to enable javascript code completion?
Goto Forum:
  


Current Time: Sun Jul 06 08:13:21 EDT 2025

Powered by FUDForum. Page generated in 0.03842 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top