Sign Up! Login: Password: New User? Forgot? Support
Top Mods!
Wowhead Search
by sonofsamedi
Digital Clock
by Wolfar15
Admin Forums
Welcome to the GuildPortal Help Community! These forums are for admin-to-admin help.
Available Forums
Forums : Feature Discussion > HTML upload interface...
Arleon (Guild Admin) 7/19/2004 7:53 AM EST : RE: HTML upload interface...

Arleon
Posts: 410
Fingers of Fury!

name="3032429">

Works like a charm (unless you mean a charm with an LDoN augment, then it works much better than that).

Here's the java code, as promised. I put it into two single static methods for brevity, in a class called GP_Tester. I am using axis from apache (http://ws.apache.org). The classes for communicating with the server have to be generated using the wsdl2java program (which is part of axis). If using the eclipse IDE, there is a nice plugin to use this, but if not, it's not that hard to run it from the command line. Once that's done, then add the newly generated classes to the classpath (or to the source directory tree) and you are all set.  Here is the code (the tabs didn't come through right, but it still has 1 space indentations):

___________________________________________________________

import com.guildportal.Services.*;  // These are generated by wsdl2java

public class GP_Tester
{
 public static String getHTML(String userName, String password,
   int contentInstanceID) throws Exception
 {
  PublisherLocator ploc = new PublisherLocator();
  PublisherSoapStub p = (PublisherSoapStub)ploc.getPublisherSoap();

  _GetFreeForm ff = new _GetFreeForm();
  
  ff.setUserName(userName);
  ff.setPassword(password);
  
  ff.setContentInstanceID(contentInstanceID);
  
  _GetFreeFormResponse resp = p.getFreeForm(ff);
  return resp.getGetFreeFormResult().getHtml();
 }


 public static void publish(Sting userName, String password,
  int contentInstanceID, String HTML_toPublish) throws Exception
 {
  PublisherLocator ploc = new PublisherLocator();
  
  PublisherSoapStub p = (PublisherSoapStub)ploc.getPublisherSoap();
  
  FreeForm fform = new FreeForm();
  fform.setContentInstanceID(contentInstanceID);
  fform.setHtml(HTML_toPublish);
  
  _Publish pub = new _Publish();
  pub.setContentData(fform);
  pub.setUserName(userName);
  pub.setPassword(password);
  
  p.publish(pub);
 }

 public static void main(String args[]) throws Exception
 {
  int contentInstanceID = 000000; // Put in your contentInstanceID
  String userName = "myname";     // Put in your username
  String password = "mypassword"; // Put in your password
  String html2publish = "THIS IS FROM WEB SERVICES"; // Some HTML
  
  System.out.println("HTML WAS: "+GP_Tester.getHTML(userName, password, contentInstanceID));

  GP_Tester.publish(userName, password, contentInstanceID, html2publish);  

  System.out.println("HTML NOW: "+GP_Tester.getHTML(userName, password, contentInstanceID));
 }
}

___________________________________________________________

Have fun. I'll try to help anyone else trying this out, just post here or send me a site email..

Hunter Arleon
Garden Stalker of Tholuxe Paells
Through The Never
"I am the would behind the arrow..."
TopBottom

Arleon (Guild Admin) 9/19/2004 11:21 PM EST : RE: HTML upload interface...

Arleon
Posts: 410
Fingers of Fury!

Hunter Arleon
Garden Stalker of Tholuxe Paells
Through The Never
"I am the would behind the arrow..."
TopBottom

Arleon (Guild Admin) 11/8/2004 10:34 AM EST : RE: HTML upload interface...

Arleon
Posts: 410
Fingers of Fury!

A month and a half later, and it's still down.

Will it ever work again? Copy and paste into all my pages is really sucking. I should be able to fall back to the automated post, but something changed there as well and it doesn't work anymore.
Hunter Arleon
Garden Stalker of Tholuxe Paells
Through The Never
"I am the would behind the arrow..."
TopBottom

536912520_Inactive (New Admin) 12/8/2004 2:54 AM EST : RE: HTML upload interface...

536912520_Inactive
Posts: 2765
Zomgawsh Poster

Wow, you guys lost me on the first page! I don't even know what you're trying to do, but it sounds like it's something I wouldn't be able to use.

*Arouin
GM of Emerald Dragons
TopBottom

qendiil (New Admin) 3/5/2005 4:13 AM EST : RE: HTML upload interface...

qendiil
Posts: 1116
Zomgawsh Poster

ROFL!!!

me too! lol
you guys are WAY over my head! and i thought i was at least a novice here! lol

TopBottom

Tubzinsac (Guild Admin) 3/5/2005 5:52 PM EST : RE: HTML upload interface...

Tubzinsac
Posts: 781
Zomgawsh Poster

I was noticing the dates on this topic and while I am lost to the complexities of the subject I am interested in what became of your efforts.
TopBottom

Admins Online
There are   members online.
So-and-so has logged on!
%title%
%message%