[prev in list] [next in list] [prev in thread] [next in thread] 

List:       uddi4j-general
Subject:    Re: [Uddi4j-general] Need help in save_tModel()
From:       "Andrew Hately" <hately () us ! ibm ! com>
Date:       2001-10-01 16:35:32
[Download RAW message or body]

This is a multipart message in MIME format.
--=_alternative 005B215486256AD8_=
Content-Type: text/plain; charset="us-ascii"

The result of setting the default description string twice, is not as you 
might expect.  UDDI registries only allow one description per language in 
V1 and V2.  The code snippet below adds a second English description the 
the tModel.

I would recommend changing the following:

//original code snippet
//tmod.setDefaultDescriptionString("Combination of Information Technology & 
Business Mgt");

//new code snippet
Vector descVector = new Vector();
descVector.add(new Description("Combination of Information Technology & 
Business Mgt"));
tmod.setDescriptionVector(descVector);


It also seems that the method name setDefaultDescriptionString might be 
confusing and it might be worth renaming it.

Andrew Hately
IBM Solution Technologies, Austin, TX
UDDI Development (http://www.ibm.com/services/uddi)






Siti Rahmah <kool_magenta@yahoo.com>
Sent by: uddi4j-general-admin@www-126.southbury.usf.ibm.com
10/01/2001 04:10 AM

 
        To:     uddi4j-general@www-126.southbury.usf.ibm.com
        cc: 
        Subject:        [Uddi4j-general] Need help in save_tModel()

 

Hi everybody! I'm trying to write a program to update
an existing TModel but i got this error:

UDDIException faultcode:Client
 operator:localhost:8080/services/uddi
 generic:1.0
 errno:10060
 errCode:E_languageError
 errInfoText:E_languageError (10060) Error processing
elements annotated with the xml:lang qualifier.
description

This is my program fragment:

try
{  
  // create proxy to inquire endpoint
  UDDIProxy uddi = new UDDIProxy();
  
 
uddi.setInquiryUR("http://localhost:8080/services/uddi/servlet/uddi");
 
uddi.setPublishURL("http://localhost:8080/services/uddi/servlet/uddi");
  
  AuthToken au = uddi.get_authToken (my_user_ID,
my_password);
  
  System.out.println("Returned token = " + 
au.getAuthInfoString());
  TModelList tml = uddi.find_tModel("Business 
Informatics", null, 0); 
  Vector tmInfovc =
tml.getTModelInfos().getTModelInfoVector();

  if(tmInfovc.size() != 0)
  {
    for(int i=0; i<tmInfovc.size(); i++)
    {
      TModelInfo info = (TModelInfo)
tmInfovc.elementAt(i);
      System.out.println("Name    = " +
info.getNameString());
      String key = info.getTModelKey();
      System.out.println("    Key = " + key);
      TModelDetail tmd = uddi.get_tModelDetail(key);
      Vector vc = tmd.getTModelVector();
      if(vc.size() != 0)
      {
        for(int j=0; j<vc.size(); j++)
        {
          TModel tmod = (TModel) vc.elementAt(j);
          OverviewDoc od = tmod.getOverviewDoc();
          if(od != null)
          { 
            String url = od.getOverviewURLString();
            if(url.equals
("http://localhost:8080/aggr/jsps/main.htm"))
            {
              System.out.println("in if");
              tmod.setTModelKey(key);
              System.out.println("after setting TModel
key");
 
tmod.setDefaultDescriptionString("Combination of
Information Technology & Business Mgt");
              System.out.println("after setting the
default desc");
              Vector tmvector = new Vector();
              tmvector.addElement(tmod);
              System.out.println("after adding tmodel
to vector");
              uddi.save_tModel(au.getAuthInfoString(),
tmvector);
              System.out.println("Updated
successfully");
            } 
          }
          else
            System.out.println("No Overview Doc");
        }
      }
    }
  }
  else
  {
    System.out.println("No courses found.");
  } 
}

I have double checked my userid & password, they're
both correct. What I intend to do is to update a
TModel called "Business Informatics" wth a new
description. Please help me check the logic too.
Thanx!

Siti


__________________________________________________
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.yahoo.com
_______________________________________________
Uddi4j-general mailing list
Uddi4j-general@www-124.ibm.com
http://www-124.ibm.com/developerworks/oss/mailman/listinfo/uddi4j-general



--=_alternative 005B215486256AD8_=
Content-Type: text/html; charset="us-ascii"


<br><font size=2 face="sans-serif">The result of setting the default description \
string twice, is not as you might expect. &nbsp;UDDI registries only allow one \
description per language in V1 and V2. &nbsp;The code snippet below adds a second \
English description the the tModel.</font> <br>
<br><font size=2 face="sans-serif">I would recommend changing the following:<br>
</font>
<br><font size=2 face="sans-serif">//original code snippet</font>
<br><font size=2 face="sans-serif">//</font><font size=2 face="Courier \
New">tmod.setDefaultDescriptionString(&quot;Combination of Information Technology \
&amp; Business Mgt&quot;);</font> <br>
<br><font size=2 face="Courier New">//new code snippet</font>
<br><font size=2 face="Courier New">Vector descVector = new Vector();</font>
<br><font size=2 face="Courier New">descVector.add(new Description(&quot;Combination \
of Information Technology &amp; Business Mgt&quot;));</font> <br><font size=2 \
face="Courier New">tmod.setDescriptionVector(descVector);<br> </font><font size=2 \
face="sans-serif"><br> </font>
<br><font size=2 face="sans-serif">It also seems that the method name \
setDefaultDescriptionString might be confusing and it might be worth renaming \
it.</font> <br><font size=2 face="sans-serif"><br>
Andrew Hately<br>
IBM Solution Technologies, Austin, TX<br>
UDDI Development (http://www.ibm.com/services/uddi)<br>
<br>
</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>Siti Rahmah \
&lt;kool_magenta@yahoo.com&gt;</b></font> <br><font size=1 face="sans-serif">Sent by: \
uddi4j-general-admin@www-126.southbury.usf.ibm.com</font> <p><font size=1 \
face="sans-serif">10/01/2001 04:10 AM</font> <br>
<td><font size=1 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; To: &nbsp; &nbsp; \
&nbsp; &nbsp;uddi4j-general@www-126.southbury.usf.ibm.com</font> <br><font size=1 \
face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; cc: &nbsp; &nbsp; &nbsp; &nbsp;</font> \
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Subject: &nbsp; &nbsp; \
&nbsp; &nbsp;[Uddi4j-general] Need help in save_tModel()</font> <br>
<br><font size=1 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp;</font></table>
<br>
<br><font size=2 face="Courier New">Hi everybody! I'm trying to write a program to \
update<br> an existing TModel but i got this error:<br>
<br>
UDDIException faultcode:Client<br>
 operator:localhost:8080/services/uddi<br>
 generic:1.0<br>
 errno:10060<br>
 errCode:E_languageError<br>
 errInfoText:E_languageError (10060) Error processing<br>
elements annotated with the xml:lang qualifier.<br>
description<br>
<br>
This is my program fragment:<br>
<br>
try<br>
{ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>  &nbsp;// create proxy to inquire \
endpoint<br>  &nbsp;UDDIProxy uddi = new UDDIProxy();<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>  <br>
uddi.setInquiryUR(&quot;http://localhost:8080/services/uddi/servlet/uddi&quot;);<br>
 <br>
uddi.setPublishURL(&quot;http://localhost:8080/services/uddi/servlet/uddi&quot;);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>  &nbsp;AuthToken au = \
uddi.get_authToken (my_user_ID,<br> my_password);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>  \
&nbsp;System.out.println(&quot;Returned token = &quot; + &nbsp;<br> \
au.getAuthInfoString());<br>  &nbsp;TModelList tml = uddi.find_tModel(&quot;Business \
<br> Informatics&quot;, null, 0); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; <br>  &nbsp;Vector tmInfovc =<br>
tml.getTModelInfos().getTModelInfoVector();<br>
<br>
 &nbsp;if(tmInfovc.size() != 0)<br>
 &nbsp;{<br>
 &nbsp; &nbsp;for(int i=0; i&lt;tmInfovc.size(); i++)<br>
 &nbsp; &nbsp;{<br>
 &nbsp; &nbsp; &nbsp;TModelInfo info = (TModelInfo)<br>
tmInfovc.elementAt(i);<br>
 &nbsp; &nbsp; &nbsp;System.out.println(&quot;Name &nbsp; &nbsp;= &quot; +<br>
info.getNameString());<br>
 &nbsp; &nbsp; &nbsp;String key = info.getTModelKey();<br>
 &nbsp; &nbsp; &nbsp;System.out.println(&quot; &nbsp; &nbsp;Key = &quot; + key);<br>
 &nbsp; &nbsp; &nbsp;TModelDetail tmd = uddi.get_tModelDetail(key);<br>
 &nbsp; &nbsp; &nbsp;Vector vc = tmd.getTModelVector();<br>
 &nbsp; &nbsp; &nbsp;if(vc.size() != 0)<br>
 &nbsp; &nbsp; &nbsp;{<br>
 &nbsp; &nbsp; &nbsp; &nbsp;for(int j=0; j&lt;vc.size(); j++)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;{<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TModel tmod = (TModel) vc.elementAt(j);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OverviewDoc od = tmod.getOverviewDoc();<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(od != null)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ <br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;String url = od.getOverviewURLString();<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(url.equals<br>
(&quot;http://localhost:8080/aggr/jsps/main.htm&quot;))<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println(&quot;in \
if&quot;);<br>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;tmod.setTModelKey(key);<br>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;System.out.println(&quot;after setting TModel<br> key&quot;);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>
tmod.setDefaultDescriptionString(&quot;Combination of<br>
Information Technology &amp; Business Mgt&quot;);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println(&quot;after \
setting the<br> default desc&quot;);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Vector tmvector = new Vector();<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;tmvector.addElement(tmod);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println(&quot;after \
adding tmodel<br> to vector&quot;);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;uddi.save_tModel(au.getAuthInfoString(),<br> tmvector);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println(&quot;Updated<br>
successfully&quot;);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;} </font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println(&quot;No Overview \
Doc&quot;);<br>  &nbsp; &nbsp; &nbsp; &nbsp;}<br>
 &nbsp; &nbsp; &nbsp;}<br>
 &nbsp; &nbsp;}<br>
 &nbsp;}<br>
 &nbsp;else<br>
 &nbsp;{<br>
 &nbsp; &nbsp;System.out.println(&quot;No courses found.&quot;);<br>
 &nbsp;} &nbsp; &nbsp; &nbsp; <br>
}<br>
<br>
I have double checked my userid &amp; password, they're<br>
both correct. What I intend to do is to update a<br>
TModel called &quot;Business Informatics&quot; wth a new<br>
description. Please help me check the logic too.<br>
Thanx!<br>
<br>
Siti<br>
<br>
<br>
__________________________________________________<br>
Do You Yahoo!?<br>
Listen to your Yahoo! Mail messages from any phone.<br>
http://phone.yahoo.com<br>
_______________________________________________<br>
Uddi4j-general mailing list<br>
Uddi4j-general@www-124.ibm.com<br>
http://www-124.ibm.com/developerworks/oss/mailman/listinfo/uddi4j-general<br>
</font>
<br>
<br>
--=_alternative 005B215486256AD8_=--


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic